Class EnumExtensions
Provides extension methods for enum types.
Inherited Members
Namespace: Coree.NETStandard.Extensions.Enums
Assembly: Coree.NETStandard.dll
Syntax
public static class EnumExtensions
Methods
| Edit this page View SourceGetDescriptionAttribute(Enum)
Retrieves the description from the DescriptionAttribute applied to an enum value, if any.
Declaration
public static string? GetDescriptionAttribute(this Enum value)
Parameters
| Type | Name | Description |
|---|---|---|
| Enum | value | The enum value for which to retrieve the description. |
Returns
| Type | Description |
|---|---|
| string | The description string from the DescriptionAttribute of the specified enum value. Returns null if no DescriptionAttribute is found. |