Productivity Tools

Tools written by an IT business manager, a passionate developer.

Description attribute value

Library allows to get description content from DescriptionAttribute.

Currently it retrieve value from following elements:

Usage example:

typeof(TestClass).GetPropertyDescription("PropertyName");  typeof(TestClass).GetFieldDescription("FieldName");  typeof(TestClass).GetMethodDescription("Method1");  testClass.Enum.GetDescription();

all methods:

Description is not existing

Method will throw an exception if we will try to get value from item which doesn’t have exception set up. You could use DescriptionExists* methods to validate before using. Methods:

Close Bitnami banner