字符串转换为枚举类型 Enum.Parse()

      例如:      

    MyType mytype = (MyType)Enum.Parse(typeof(MyType), "AValue");

posted on 2014-05-29 07:21  橡皮鱼  阅读(478)  评论(0编辑  收藏  举报