Share via


Extensions.GetValue<T>(IBotDataBag, String) Method

Definition

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.

Exceptions

Applies to