I want to use somthing like Attribute to validate datapublic class MyClass
public string name;
[StringLength(10, MinimumLength = 3)]
public string code;
} And in the code i want to check the myClass object is valid or not using something like:MyClass myClass = new MyClass("smith","aa")
//do some thing here
} So, anybody can show my the way to do something like i wrote.Many thank!!!
View Complete Post