Class EnumUtils
Provides static utility methods for working with Enum types.
public static class EnumUtils
- Inheritance
-
EnumUtils
- Inherited Members
Methods
GetDescription(Enum)
Retrieves the human-readable description for an enumeration value by inspecting its DescriptionAttribute. Falls back to the enum's string representation when no description attribute is defined on the member.
public static string GetDescription(Enum value)
Parameters
valueEnumThe enumeration value whose description should be obtained.
Returns
- string
The description text from the DescriptionAttribute if present; otherwise, the string representation of the enum value.