Class EnumExtensions
Enum extensions.
Namespace: Neon.Common
Assembly: Neon.Common.dll
Syntax
public static class EnumExtensions
Methods
ToMemberString(Enum)
Converts an enumeration value into a string, using the EnumMemberAttribute value if one was specified for the value in the enumeration type definition otherwise the default enumeration value name will be returned.
Declaration
public static string ToMemberString(this Enum value)
Parameters
Type | Name | Description |
---|---|---|
Enum | value | The enumeration value to be converted. |
Returns
Type | Description |
---|---|
string | The member or default string value. |
Remarks
This is useful because ToString() ignores any EnumMemberAttribute attributes.