Udostępnij za pośrednictwem


FormsAuthenticationUserCollection.GetKey(Int32) Metoda

Definicja

Pobiera klucz w określonym FormsAuthenticationUserCollection indeksie kolekcji.

public:
 System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String

Parametry

index
Int32

Indeks w kolekcji.

Zwraca

Klucz w określonym indeksie elementu FormsAuthenticationUserCollection.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać GetKey metody .

// Get the key at the specified index.
string thisKey = formsAuthenticationCredentials.Users.GetKey(0).ToString();
' Get the key at the specified index.
  Dim thisKey As String = _
  formsAuthenticationCredentials.Users.GetKey(0)

Dotyczy