共用方式為


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

適用於

另請參閱