var memInfo = enumType.GetType().GetMember(enumType.ToString());

var attributes = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false).Cast<DescriptionAttribute>();
if (attributes.Any())
return attributes.First().Description;
return string.Empty;

相关文章:

  • 2021-10-02
  • 2022-12-23
  • 2021-09-25
  • 2021-07-29
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-09-02
  • 2021-08-23
  • 2022-12-23
  • 2021-08-08
相关资源
相似解决方案