Udostępnij za pośrednictwem


FormsAuthenticationUserCollection.Item[] Właściwość

Definicja

Pobiera określony FormsAuthenticationUser element kolekcji.

Przeciążenia

Item[Int32]

Pobiera obiekt FormsAuthenticationUser w określonym indeksie.

Item[String]

Pobiera element FormsAuthenticationUser o określonej nazwie.

Item[Int32]

Pobiera obiekt FormsAuthenticationUser w określonym indeksie.

public:
 property System::Web::Configuration::FormsAuthenticationUser ^ default[int] { System::Web::Configuration::FormsAuthenticationUser ^ get(int index); void set(int index, System::Web::Configuration::FormsAuthenticationUser ^ value); };
public System.Web.Configuration.FormsAuthenticationUser this[int index] { get; set; }
member this.Item(int) : System.Web.Configuration.FormsAuthenticationUser with get, set
Default Public Property Item(index As Integer) As FormsAuthenticationUser

Parametry

index
Int32

Indeks użytkownika kolekcji.

Wartość właściwości

FormsAuthenticationUser

Element FormsAuthenticationUser zawierający nazwę użytkownika i hasło.

Przykłady

Poniższy przykład kodu pokazuje, jak uzyskać dostęp do poświadczeń użytkownika w określonym indeksie.

// Get the user element at the specified index.
FormsAuthenticationUser storedUser3 = 
    formsAuthenticationCredentials.Users[0];
' Get the user element at the specified index.
  Dim storedUser3 As FormsAuthenticationUser = _
  formsAuthenticationCredentials.Users(0)

Dotyczy

Item[String]

Pobiera element FormsAuthenticationUser o określonej nazwie.

public:
 property System::Web::Configuration::FormsAuthenticationUser ^ default[System::String ^] { System::Web::Configuration::FormsAuthenticationUser ^ get(System::String ^ name); };
public System.Web.Configuration.FormsAuthenticationUser this[string name] { get; }
member this.Item(string) : System.Web.Configuration.FormsAuthenticationUser
Default Public ReadOnly Property Item(name As String) As FormsAuthenticationUser

Parametry

name
String

Nazwa użytkownika.

Wartość właściwości

FormsAuthenticationUser

FormsAuthenticationUser Obiekt, który zawiera nazwę użytkownika i hasło.

Przykłady

Poniższy przykład kodu pokazuje, jak uzyskać dostęp do poświadczeń użytkownika o określonej nazwie.

// Get the user element with the specified name.
FormsAuthenticationUser storedUser4 = 
    formsAuthenticationCredentials.Users["userName"];
' Get the user element with the specified name.
  Dim storedUser4 As FormsAuthenticationUser = _
  formsAuthenticationCredentials.Users("userName")

Dotyczy