Implements Enum functions that are missing in .NET Standard 2.0.
More...
|
static T | Parse< T > (string value, bool ignoreCase) |
| Parses a string to an enum.
|
|
static T | Parse< T > (string value) |
| Parses a string to an enum.
|
|
Implements Enum functions that are missing in .NET Standard 2.0.
Definition at line 10 of file BadEnum.cs.
◆ Parse< T >() [1/2]
static T BadScript2.Utility.BadEnum.Parse< T > |
( |
string |
value | ) |
|
|
static |
Parses a string to an enum.
- Parameters
-
- Template Parameters
-
- Returns
- The Enum Value
Definition at line 30 of file BadEnum.cs.
30 : Enum
31 {
32 return (T)Enum.Parse(typeof(T), value);
33 }
◆ Parse< T >() [2/2]
static T BadScript2.Utility.BadEnum.Parse< T > |
( |
string |
value, |
|
|
bool |
ignoreCase |
|
) |
| |
|
static |
Parses a string to an enum.
- Parameters
-
value | The String Value |
ignoreCase | Should we ignore case? |
- Template Parameters
-
- Returns
- The Enum Value
Definition at line 19 of file BadEnum.cs.
19 : Enum
20 {
21 return (T)Enum.Parse(typeof(T), value, ignoreCase);
22 }
The documentation for this class was generated from the following file: