I’ve a enum class like,
public enum USERTYPE
{
Permanant=1,
Temporary=2,
}
in my business object I just declare this enum as
private List<USERTYPE> userType=new List<USERTYPE>;
and in the get/set method, I tried like
public List<USERTYPE> UserType
{
get
{
return userType;
}
set
{
userType= value;
}
}
here it returns the no of rows as 0, how can I get all the values in the Enum here, can anyone help me here…
You can use this to get all individual enum values:
If you do things like this more often, you could create a generic utility method for it: