c# init enum from int code example
Example 1: convert int to enum c#
YourEnum foo = (YourEnum)yourInt;
Example 2: enums c#
enum Season
{
Spring,
Summer,
Autumn,
Winter
}
YourEnum foo = (YourEnum)yourInt;
enum Season
{
Spring,
Summer,
Autumn,
Winter
}