共用方式為


IHttpSessionState.Keys 屬性

定義

取得會話狀態項目集合中所有值的鍵集合。

public:
 property System::Collections::Specialized::NameObjectCollectionBase::KeysCollection ^ Keys { System::Collections::Specialized::NameObjectCollectionBase::KeysCollection ^ get(); };
public System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get; }
member this.Keys : System.Collections.Specialized.NameObjectCollectionBase.KeysCollection
Public ReadOnly Property Keys As NameObjectCollectionBase.KeysCollection

屬性值

NameObjectCollectionBase.KeysCollection 個包含所有會話項目金鑰。

範例

以下程式碼範例實 Keys 作了介面的 IHttpSessionState 特性,從內部會話狀態項目集合中回傳一組會話狀態項目鍵名稱。

public NameObjectCollectionBase.KeysCollection Keys
{
  get { return pSessionItems.Keys; }
}
Public ReadOnly Property Keys As NameObjectCollectionBase.KeysCollection _
  Implements IHttpSessionState.Keys

  Get
    Return pSessionItems.Keys
  End Get
End Property

適用於

另請參閱