Method TryGetValue
TryGetValue(string, out T)
Gets the enumeration value with the given name.
Declaration
public static bool TryGetValue(string name, out T value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the enumeration value. |
T | value | Contains the matched value when the method returns if the value was found, otherwise the default value of |
Returns
Type | Description |
---|---|
bool |
TryGetValue(string, bool, out T)
Gets the enumeration value with the given name.
Declaration
public static bool TryGetValue(string name, bool ignoreCase, out T value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the enumeration value. |
bool | ignoreCase | true for case-insensitive or false for case-sensitive matching. |
T | value | Contains the matched value when the method returns if the value was found, otherwise the default value of |
Returns
Type | Description |
---|---|
bool |