# Class HelperEnum OptimaJet.Workflow.Core.Helpers.HelperEnum Provides helpers for validating, inspecting, parsing, and presenting enumeration values. Namespace: [OptimaJet.Workflow.Core.Helpers](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Helpers/) ```csharp public static class HelperEnum ``` ## Methods `public static bool IsEnumType() where TEnum : struct` Determines whether `TEnum` is an enumeration type. ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `TEnum` is an enumeration type; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static bool IsEnumType(Type enumType)` Determines whether a [Type](https://learn.microsoft.com/dotnet/api/system.type) represents an enumeration. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Type` | The [Type](https://learn.microsoft.com/dotnet/api/system.type) to examine. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `enumType` is not [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) and represents an enumeration; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static bool Contains(string value, bool Exeption = true) where TEnum : struct` Determines whether `TEnum` defines the member name supplied in `value`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `String` | The member name to find. | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.IsDefined(Type, object)](https://learn.microsoft.com/dotnet/api/system.enum.isdefined) validate `TEnum` when a nonempty name is tested; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `value` is not empty and names a defined member; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static bool Contains(Type enumType, string value, bool Exeption = true)` Determines whether an enumeration type defines the member name supplied in `value`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Type` | The [Type](https://learn.microsoft.com/dotnet/api/system.type) to inspect. | | `value` | `String` | The member name to find. | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.IsDefined(Type, object)](https://learn.microsoft.com/dotnet/api/system.enum.isdefined) validate `enumType` when a nonempty name is tested; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when `enumType` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `value` is not empty and names a defined member of `enumType`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static string GetName(TEnum value) where TEnum : struct` Gets the declared name associated with an enumeration value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{TEnum}` | The enumeration value whose name to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The declared name associated with `value`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no name is defined. | `public static string GetName(Type enumType, TEnum value) where TEnum : struct` Gets the declared name associated with a value in a specified enumeration type. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Type` | The enumeration [Type](https://learn.microsoft.com/dotnet/api/system.type) to inspect. | | `value` | `{TEnum}` | The value whose name to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The declared name associated with `value` in `enumType`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no name is defined. | `public static string Name(this Enum enumType)` Gets the declared name associated with an enumeration value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Enum` | The [Enum](https://learn.microsoft.com/dotnet/api/system.enum) value whose name to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The declared name associated with `enumType`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no name is defined. | `public static string UpperName(this Enum enumType)` Gets the declared name associated with an enumeration value and converts it to uppercase according to the current culture. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Enum` | The [Enum](https://learn.microsoft.com/dotnet/api/system.enum) value whose name to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The uppercase form of the declared name associated with `enumType`. | `public static List GetNames(bool Exeption = true) where TEnum : struct` Gets the names of all members declared by `TEnum`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.GetNames(Type)](https://learn.microsoft.com/dotnet/api/system.enum.getnames) validate `TEnum`; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared member names, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static List GetNames(Type enumType, bool Exeption = true)` Gets the names of all members declared by an enumeration type. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Type` | The enumeration [Type](https://learn.microsoft.com/dotnet/api/system.type) to inspect. | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.GetNames(Type)](https://learn.microsoft.com/dotnet/api/system.enum.getnames) validate `enumType`; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `enumType` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared member names, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `enumType` is invalid and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static List GetNames(List enumValues, bool Exeption = true) where TEnum : struct` Converts the supplied enumeration values to their declared names. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumValues` | `List` | The enumeration values to convert. | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let enumeration name retrieval validate `TEnum`; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list containing one name for each value in `enumValues`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). An entry is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when its value has no declared name. | `public static List GetValues(bool Exeption = true) where TEnum : struct` Gets the values declared by `TEnum`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.GetValues(Type)](https://learn.microsoft.com/dotnet/api/system.enum.getvalues) validate `TEnum`; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared enumeration values, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static List GetValues(Type enumType, bool Exeption = true) where TEnum : struct` Gets the values declared by a specified enumeration type that are assignable to `TEnum`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Type` | The enumeration [Type](https://learn.microsoft.com/dotnet/api/system.type) whose values to retrieve. | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.GetValues(Type)](https://learn.microsoft.com/dotnet/api/system.enum.getvalues) validate `enumType`; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `enumType` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list of values from `enumType` that are assignable to `TEnum`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `enumType` is invalid and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static List GetValuesWithoutDefault(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct` Gets the values declared by `TEnum`, excluding values equal to `defaultValue`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to validate `TEnum` during value retrieval; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | | `defaultValue` | `{TEnum}` | The value to exclude. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared values that are not equal to `defaultValue`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static bool ValidateEnumInDictionary(IDictionary dictionary, bool withExceptions, out List notExists) where TEnum : struct` Validates that a dictionary contains a key for every value declared by `TEnum` except its default value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `dictionary` | `IDictionary` | The dictionary to validate. | | `withExceptions` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to throw when the first required key is missing; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to collect the names of all missing keys. | | `notExists` | `List` | When this method returns, the declared names of required enumeration values that are not keys in `dictionary`. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if every required enumeration value is present as a key; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | ### Exceptions | Type | Description | | --- | --- | | `KeyNotFoundException` | `withExceptions` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) and a required enumeration value is not a key in `dictionary`. | `public static List GetValuesWithout(List excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct` Gets the values declared by `TEnum`, excluding the values in `excludedElements`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `excludedElements` | `List` | The values to exclude. | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to also exclude the default value of `TEnum`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to validate `TEnum` during value retrieval; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared values not contained in `excludedElements`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | ### Remarks If `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), the method adds the default value of `TEnum` to `excludedElements` when it is not already present. `public static List GetNamesWithout(List excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct` Gets the declared names of `TEnum` values not contained in `excludedElements`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `excludedElements` | `List` | The values whose names to exclude. | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to also exclude the default value of `TEnum`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to validate `TEnum` during value retrieval; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to skip that validation. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared names for values not contained in `excludedElements`. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) and `TEnum` is not an enumeration type. | ### Remarks If `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), the method adds the default value of `TEnum` to `excludedElements` when it is not already present. `public static List GetNamesWithoutDefault(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct` Gets the declared names of `TEnum`, excluding the name associated with `defaultValue`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to validate `TEnum` during name retrieval; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type. | | `defaultValue` | `{TEnum}` | The value whose declared name to exclude. | ### Returns | Type | Description | | --- | --- | | `List` | A list of declared names other than the name associated with `defaultValue`, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when `TEnum` is not an enumeration type and `Exeption` is [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static TEnum GetValue(string value, bool ignoreCase = true, bool Exeption = true) where TEnum : struct` Gets the `TEnum` value associated with a declared member name. ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `String` | The declared member name to parse. | | `ignoreCase` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to request case-insensitive parsing after `value` passes the case-sensitive defined-name check; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.IsDefined(Type, object)](https://learn.microsoft.com/dotnet/api/system.enum.isdefined) validate `TEnum` when a nonempty name is tested; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return the default value of `TEnum` when it is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `{TEnum}` | The parsed value, or the default value of `TEnum` when `value` is empty or is not a defined member name. | `public static bool TryGetValue(string value, out TEnum result, bool ignoreCase = true, bool Exeption = true) where TEnum : struct` Attempts to get the `TEnum` value associated with a declared member name. ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `String` | The declared member name to parse. | | `result` | `{TEnum}` | When this method returns, the parsed value if successful; otherwise, the default value of `TEnum`. | | `ignoreCase` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to request case-insensitive parsing after `value` passes the case-sensitive defined-name check; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `Exeption` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to let [Enum.IsDefined(Type, object)](https://learn.microsoft.com/dotnet/api/system.enum.isdefined) validate `TEnum` when a nonempty name is tested; [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to return [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when `TEnum` is not an enumeration type. | ### Returns | Type | Description | | --- | --- | | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `value` is a defined member name and was parsed successfully; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | `public static List ToDropdownList(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct` Creates [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries for the names declared by `TEnum`, optionally excluding the name associated with a specified value. ### Parameters | Name | Type | Description | | --- | --- | --- | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to exclude the name associated with `defaultValue`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `defaultValue` | `{TEnum}` | The value whose declared name to exclude when `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | ### Returns | Type | Description | | --- | --- | | `List` | A list of [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries whose [DropdownValue.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) and [DropdownValue.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) properties are set to each included member name. | `public static List ToDropdownListWithout(List values, bool withoutDefault) where TEnum : struct` Creates [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries for the names declared by `TEnum`, excluding specified values. ### Parameters | Name | Type | Description | | --- | --- | --- | | `values` | `List` | The values whose names to exclude. | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to also exclude the default value of `TEnum`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | ### Returns | Type | Description | | --- | --- | | `List` | A list of [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries whose [DropdownValue.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) and [DropdownValue.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) properties are set to each included member name. | ### Remarks If `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), the method adds the default value of `TEnum` to `values` when it is not already present. `public static List ToDropdownList(List excludedElements, bool withoutDefault, TEnum defaultValue = default) where TEnum : struct` Creates [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries for the names declared by `TEnum`, excluding specified values. ### Parameters | Name | Type | Description | | --- | --- | --- | | `excludedElements` | `List` | The values whose names to exclude. | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to also exclude the default value of `TEnum`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `defaultValue` | `{TEnum}` | Unused by the current implementation. | ### Returns | Type | Description | | --- | --- | | `List` | A list of [DropdownValue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) entries whose [DropdownValue.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) and [DropdownValue.Value](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/DropdownValue/) properties are set to each included member name. | ### Remarks If `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool), the method adds the default value of `TEnum` to `excludedElements` when it is not already present. `defaultValue` does not affect the result. `public static Dictionary ToDictionary(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct` Creates a mapping from the declared names of `TEnum` to their values. ### Parameters | Name | Type | Description | | --- | --- | --- | | `withoutDefault` | `Boolean` | [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) to exclude values equal to `defaultValue`; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | | `defaultValue` | `{TEnum}` | The value to exclude when `withoutDefault` is [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). | ### Returns | Type | Description | | --- | --- | | `Dictionary` | A mapping from each included declared name to its enumeration value. | `public static string GetDescription(TEnum value) where TEnum : struct` Gets the description assigned to an enumeration member through [DescriptionAttribute](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute). ### Parameters | Name | Type | Description | | --- | --- | --- | | `value` | `{TEnum}` | The enumeration value whose description to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The [DescriptionAttribute.Description](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute.description) value, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if the member has no [DescriptionAttribute](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute). | `public static string Description(this Enum enumType)` Gets the description assigned to an enumeration member through [DescriptionAttribute](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute). ### Parameters | Name | Type | Description | | --- | --- | --- | | `enumType` | `Enum` | The [Enum](https://learn.microsoft.com/dotnet/api/system.enum) value whose description to retrieve. | ### Returns | Type | Description | | --- | --- | | `String` | The [DescriptionAttribute.Description](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute.description) value, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if the member has no [DescriptionAttribute](https://learn.microsoft.com/dotnet/api/system.componentmodel.descriptionattribute). | [Previous HelperDateTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Helpers/HelperDateTime/) [Next HelperParser](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Helpers/HelperParser/)