共用方式為


ISessionStateItemCollection.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 ,這個屬性會使用 SortedList 來儲存會話變數名稱和值。 如需介面完整實作的 ISessionStateItemCollection 範例,請參閱介面概觀中 ISessionStateItemCollection 提供的範例。

public NameObjectCollectionBase.KeysCollection Keys
{
  get { return (NameObjectCollectionBase.KeysCollection)pItems.Keys; }
}
Public ReadOnly Property Keys As NameObjectCollectionBase.KeysCollection _
  Implements ISessionStateItemCollection.Keys
  Get
    Return CType(pItems.Keys, NameObjectCollectionBase.KeysCollection)
  End Get
End Property

適用於

另請參閱