Method GetValue
GetValue<T>(string)
Gets the value associated with the specified key, parsed as the specified type using invariant culture formatting.
Declaration
public T GetValue<T>(string key) where T : notnull, IParsable<T>
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The query parameter key. |
Returns
| Type | Description |
|---|---|
| T | The parsed value associated with the specified key. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to parse the value as, which must implement IParsable<TSelf>. |
Exceptions
| Type | Condition |
|---|---|
| KeyNotFoundException | Thrown if the key was not found. |
| FormatException | Thrown if the key is found but parsing fails. |