welcome to Qijie's Blog 薛其杰
public static String convertToString(this Enum eff)
{
    return Enum.GetName(eff.GetType(), eff);
}

public static EnumType converToEnum<EnumType>(this String enumValue)  
{
    return (EnumType) Enum.Parse(typeof(EnumType), enumValue);
}


post from : http://stackoverflow.com/questions/483794/convert-enum-to-string

posted on 2014-03-17 16:34  零点零一  阅读(1484)  评论(0编辑  收藏  举报