public enum aa{ a1=1,a2=2,a3=6,...,a100=203}
How to get value like this
string att=GetFromDatabase("attribute"); //this return a1 or a2 ...
Enum.GetValue(att);
public enum aa{ a1=1,a2=2,a3=6,...,a100=203}
How to get value like this
string att=GetFromDatabase("attribute"); //this return a1 or a2 ...
Enum.GetValue(att);
Something like this should do the trick:
Go to http://msdn.microsoft.com/en-us/library/system.enum.parse.aspx for more details.
Solution
Use Enum.Parse