public enum Color { Red=1, Green=2 }
(1)Enum转换为String
Color.Read.ToString() Convert.ToString(Color.Green)
(2)Enum转换为int
Convert.ToInt32(Color.Green)
(a)String转换为Enum
(Color)Enum.Parse(typeof(Color), "Red");
(b)Int转换为Num
(Color)1