Condividi tramite


ISessionStateItemCollection.Keys Proprietà

Definizione

Ottiene una raccolta dei nomi delle variabili per tutti i valori archiviati nella raccolta.

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

Valore della proprietà

Oggetto NameObjectCollectionBase.KeysCollection contenente tutte le chiavi della raccolta.

Esempio

Nell'esempio di codice seguente viene illustrata un'implementazione della Keys proprietà che usa un SortedList oggetto per archiviare i nomi e i valori delle variabili di sessione. Per un esempio di implementazione completa dell'interfaccia ISessionStateItemCollection , vedere l'esempio fornito nella panoramica dell'interfaccia 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

Si applica a

Vedi anche