public enum temp{ A=1, B=2, C=3,}int A = (int)Enum.Parse(typeof(temp),"A"); 转载于:https://www.cnblogs.com/Jan_Dai/archive/2010/11/09/1872741.html