/// <summary>
/// 获取枚举值上的Description特性说明
/// </summary>
/// <typeparam name="T">枚举类型</typeparam>
/// <param name="obj">枚举值</param>
/// <returns></returns>
public static string GetDescription<T>(T obj)
{
Type type = obj.GetType();
FieldInfo field = type.GetField(Enum.GetName(type, obj));
DescriptionAttribute desc = Attribute.GetCustomAttribute
(field, typeof(DescriptionAttribute)) as DescriptionAttribute;
if(desc == null)
{
return string.Empty;
} return desc.Description;
}