Is there a way to parse enum value from table record. For example, I have class which contains user data, and on of them is Enum type. The data is passed from DataRow, but I have trouble parsing enum value.
I tried something like this,
uType= (EType) Enum.TryParse(typeof(row["userType"]));
but it wouldn’t compile. Any tip?
Thanks.
try with this code