Extensions.GetValue<T>(IBotDataBag, String) 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.
Gets the value associated with the specified key.
public static T GetValue<T> (this Microsoft.Bot.Builder.Dialogs.IBotDataBag bag, string key);
static member GetValue : Microsoft.Bot.Builder.Dialogs.IBotDataBag * string -> 'T
<Extension()>
Public Function GetValue(Of T) (bag As IBotDataBag, key As String) As T
Type Parameters
- T
The type of the value to get.
Parameters
- bag
- IBotDataBag
The bot data bag.
- key
- String
The key of the value to get or set.
Returns
T
The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException.