HttpSessionStateWrapper.Item[] 屬性

定義

取得或設定個別會話的值。

多載

名稱 Description
Item[Int32]

透過指定的索引取得或設定會話值。

Item[String]

透過指定名稱取得或設定會話值。

Item[Int32]

透過指定的索引取得或設定會話值。

public:
 virtual property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
public override object this[int index] { get; set; }
member this.Item(int) : obj with get, set
Default Public Overrides Property Item(index As Integer) As Object

參數

index
Int32

會話值的索引。

屬性值

儲存在指定索引的會話狀態值。

例外狀況

index 超出該集合有效索引範圍。

適用於

Item[String]

透過指定名稱取得或設定會話值。

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); void set(System::String ^ name, System::Object ^ value); };
public override object this[string name] { get; set; }
member this.Item(string) : obj with get, set
Default Public Overrides Property Item(name As String) As Object

參數

name
String

會話值的鍵名稱。

屬性值

使用指定名稱的會話狀態值,或 null 是該項目不存在。

適用於