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