I\'ve a enum class like,
public enum USERTYPE
{
Permanant=1,
Temporary=2,
}
in my business object I just declare this enum as
<
If you want to get specific enum value from the list user.UserType
then you first need to Add
enum value to this list:
var user = new User();
//1 value - PERMANENT
user.UserType.Add(USERTYPE.Permanent);
But if you only need to get all the possible values from an arbitrary enum
then you can try Enum.GetValues
//2 values - Permanant and Temporary
var enums = Enum.GetValues(typeof(USERTYPE));