IHttpSessionState.Keys 属性
定义
获取存储在会话状态项集合中的所有值的键的集合。Gets a collection of the keys for all values stored in the session-state item collection.
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。The NameObjectCollectionBase.KeysCollection that contains all the session-item keys.
示例
下面的代码示例实现了 Keys 接口的属性 IHttpSessionState ,以返回内部会话状态项集合中的会话状态项密钥名称的集合。The following code example implements the Keys property of the IHttpSessionState interface to return a collection of session-state item key names from the internal session-state item collection.
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