获取类的描述信息 DescriptionAttribute
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(); }