Class Enum<T>
Provides methods and properties for getting enumeration names, values and other useful information.
Inheritance
Namespace: Singulink.Enums
Assembly: Singulink.Enums.dll
Syntax
public static class Enum<T> where T : unmanaged, Enum
Type Parameters
| Name | Description |
|---|---|
| T |
Properties
| Name | Description |
|---|---|
| IsFlagsEnum | Gets a value indicating whether this enumeration is a flags enumeration (i.e. has FlagsAttribute applied to it). |
| Names | Gets all the defined names for the enumeration, ordered by their value. |
| Values | Gets all the defined values for the enumeration, ordered by the value. |
Methods
| Name | Description |
|---|---|
| GetFields() | Gets the enumeration fields that define its names and values. This is a slow reflection-based operation that is not cached. |
| GetValue(string, bool) | Gets the enumeration value with the given name. |
| Parse(string, bool) | Gets the enumeration value parsed from the specified string. |
| TryGetValue(string, bool, out T) | Gets the enumeration value with the given name. |
| TryGetValue(string, out T) | Gets the enumeration value with the given name. |
| TryParse(string, bool, out T) | Gets the enumeration value parsed from the specified string. |
| TryParse(string, out T) | Gets the enumeration value parsed from the specified string. |