static void Main(string[] args)
        {
            var attrs = typeof(TestClass).GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), true);
            if (attrs.Length > 0)
            {
                var descriptionAttribute = attrs[0] as System.ComponentModel.DescriptionAttribute;
                if (descriptionAttribute != null)
                    Console.WriteLine(descriptionAttribute.Description);
            }
            Console.ReadKey();
        }

 

相关文章:

  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-10-08
猜你喜欢
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2021-11-19
相关资源
相似解决方案