cast int to enum type c#

43

cast int to enum type c# -

YourEnum foo = (YourEnum)Enum.ToObject(typeof(YourEnum) , yourInt);

cast int to enum type c# -

YourEnum foo = (YourEnum)yourInt;

Comments

Submit
0 Comments