Method TryGetValue
TryGetValue<T>(string, out T)
Tries to get the value of a variable of a specified type.
Declaration
bool TryGetValue<T>(string variableName, out T result)
Parameters
Type | Name | Description |
---|---|---|
string | variableName | The name of the variable. |
T | result | When this method returns, contains the value of the variable if found; otherwise, the default value for the type. |
Returns
Type | Description |
---|---|
bool | true if the variable was found; otherwise, false. |
Type Parameters
Name | Description |
---|---|
T | The expected type of the variable's value. |