Helper class for extending the functionality of the static
- See also
- Enum
class with compile-time-type-specific static methods.
More...
|
static string | GetName (T value) |
| Convert the enumeration value to a string.
|
|
static T | Parse (string value) |
| Convert the string to an enumeration value.
|
|
static bool | TryParse (string value, out T result) |
| Try to convert the string to an enumeration value.
|
|
|
static IEnumerable< string > | Names [get] |
| Get all names in an enumeration.
|
|
static IEnumerable< T > | Values [get] |
| Get all values in an enumeration.
|
|
Helper class for extending the functionality of the static
- See also
- Enum
class with compile-time-type-specific static methods.
- Type Constraints
-
T | : | struct | |
T | : | IComparable | |
T | : | IFormattable | |
T | : | IConvertible | |
Definition at line 10 of file Enum.cs.
◆ GetName()
Convert the enumeration value to a string.
The uses a cached dictionary of names, so it is faster than the Enum.GetName implementation, but not as fast as creating a custom switch statement for a given enum.
◆ Parse()
Convert the string to an enumeration value.
Uses case-insensitive parsing rules.
◆ TryParse()
Try to convert the string to an enumeration value.
Uses case-insensitive parsing rules.
◆ Names
Get all names in an enumeration.
Definition at line 24 of file Enum.cs.
◆ Values
Get all values in an enumeration.
Definition at line 17 of file Enum.cs.
The documentation for this class was generated from the following file: