Convert a .NET enum to a dictionary (Dictionary<int, string>);
var enumDictionary = Enum.GetValues(typeof(MyEnum)).Cast<int>().ToDictionary(e => e, e => Enum.GetName(typeof(MyEnum), e));
Convert a .NET enum to a dictionary (Dictionary<int, string>);
var enumDictionary = Enum.GetValues(typeof(MyEnum)).Cast<int>().ToDictionary(e => e, e => Enum.GetName(typeof(MyEnum), e));