cast int to enum type c#

45

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