EnumExtensions Methods
GetDisplayName
Returns the display name of an Enum from the Description attribute in the enum. E.g:
Syntax:
Parameters:
Parameter
Description
value
Type: Enum The enum value on which the extension is called and for which the display name will be returned.
Return Value:
The display name string associated with the enum value. If the value has no Description attribute, null is returned.
GetFlags
Returns all flags that are set for a flagged enum value. E.g:
Syntax:
Parameters:
Parameter
Description
input
Type: Enum The enum value on which the extension is called and for which the flags will be returned.
Return Value:
An IEnumerable<Enum> which enumerates all flags that are set in the input value.
Last updated