enumerable of int to enum c# code example
Example 1: convert int to enum c#
YourEnum foo = (YourEnum)yourInt;
Example 2: c# enum to int array
int[] b = Array.ConvertAll((int[])Enum.GetValues(typeof(TestEnum)), Convert.ToInt32);
YourEnum foo = (YourEnum)yourInt;
int[] b = Array.ConvertAll((int[])Enum.GetValues(typeof(TestEnum)), Convert.ToInt32);