Nucleus .Net Core CMS

EnumExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extension methods for enums.
Description (Enum value)
Returns the description property of the T:System.ComponentModel.DataAnnotations.DisplayAttribute attribute for the specified enum value, or an empty string if no description attribute is present.
Parameters
Name Type
value Enum
DisplayName (Enum value)
Returns the name property of the T:System.ComponentModel.DataAnnotations.DisplayAttribute attribute for the specified enum value, or the name if no display attribute is present.
Parameters
Name Type
value Enum
Prompt (Enum value)
Returns the prompt property of the T:System.ComponentModel.DataAnnotations.DisplayAttribute attribute for the specified enum value, or an empty string if no prompt attribute is present.
Parameters
Name Type
value Enum