C
CuMPeEWeEr [No MCSD]
public enum Color {Red=1; Yellow=2; Orange=3; }
Is there a way to get the value of the Color easily? I know it can be done
using Enum.GetValues(typeof(Color)) but I have to use a for-loop to get the
value in this case. Is there a direct way to get the value? something like
Enum.GetValue(Color.Red) and returns 1?
Thanks..
Is there a way to get the value of the Color easily? I know it can be done
using Enum.GetValues(typeof(Color)) but I have to use a for-loop to get the
value in this case. Is there a direct way to get the value? something like
Enum.GetValue(Color.Red) and returns 1?
Thanks..