/// <summary>
/// 枚举集合类
/// </summary>
public class EnumList
{
public int EnumValue;//枚举值
public string EnumName;//枚举名称
}
/// <summary>
/// 将枚举以list集合返回
/// </summary>
/// <param name="enumType"></param>
/// <returns></returns>
public static List<EnumList> EnumToList(Type enumType)
{
List<EnumList> Emlist = new List<EnumList>();
foreach (int i in Enum.GetValues(enumType))
{
EnumList em = new EnumList();
em.EnumValue = i;
em.EnumName = Enum.GetName(enumType, i);
Emlist.Add(em);
}
return Emlist;
}