Method TryParse
TryParse(string, out T)
Gets the enumeration value parsed from the specified string.
Declaration
public static bool TryParse(string s, out T value)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string to be parsed. |
T | value | Contains the resulting value when the method returns if parsing was successful, otherwise the default value of |
Returns
Type | Description |
---|---|
bool |
TryParse(string, bool, out T)
Gets the enumeration value parsed from the specified string.
Declaration
public static bool TryParse(string s, bool ignoreCase, out T value)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string to be parsed. |
bool | ignoreCase | true for case-insensitive or false for case-sensitive parsing. |
T | value | Contains the resulting value when the method returns if parsing was successful, otherwise the default value of |
Returns
Type | Description |
---|---|
bool |