语言

TurnContextStateCollection.Set 方法

定义

重载

名称 说明
Set<T>(T)

将值设定为回合的上下文。

Set<T>(String, T)

将值设定为回合的上下文。

Set<T>(T)

将值设定为回合的上下文。

public void Set<T>(T value) where T : class;
member this.Set : 'T -> unit (requires 'T : null)
Public Sub Set(Of T As Class) (value As T)

类型参数

T

对象的类型。

参数

value
T

要添加的值。

例外

value是空。

适用于

Set<T>(String, T)

将值设定为回合的上下文。

public void Set<T>(string key, T value) where T : class;
member this.Set : string * 'T -> unit (requires 'T : null)
Public Sub Set(Of T As Class) (key As String, value As T)

类型参数

T

对象的类型。

参数

key
String

对象的名称。

value
T

要添加的值。

例外

key 或 value为零。

适用于