TurnState.Get Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Get<T>() |
Gets a typed state object. Creates a new instance via parameterless constructor if not present. |
| Get<T>(String) |
Gets a value by key. Returns |
Get<T>()
Gets a typed state object. Creates a new instance via parameterless constructor if not present.
public T Get<T>() where T : class, new();
member this.Get : unit -> 'T (requires 'T : null and 'T : (new : unit -> 'T))
Public Function Get(Of T As {Class, New}) () As T
Type Parameters
- T
Returns
Applies to
Get<T>(String)
Gets a value by key. Returns default if the key is not present or the value cannot be converted.
public T? Get<T>(string key);
member this.Get : string -> 'T
Public Function Get(Of T) (key As String) As T
Type Parameters
- T
Parameters
- key
- String