摘要: 定义一个枚举: private enum myType { a = 1, b = 2, c = 3, lao = 4 }//字符串转枚举 bool TryParse = Enum.IsDefined(typeof(myType), "a"); if (TryParse) { object m = Enum.Parse(typeof(myType), "c"); myType t = (myType)m; }//枚举转字符串myType.a.... 阅读全文
posted @ 2014-03-28 16:13 JasonGu0 阅读(1104) 评论(0) 推荐(0) 编辑