Share via


FormsAuthenticationUserCollection.Item[] Proprietà

Definizione

Ottiene l'elemento dell'insieme FormsAuthenticationUser specificato.

Overload

Item[Int32]

Ottiene FormsAuthenticationUser in corrispondenza dell'indice specificato.

Item[String]

Ottiene FormsAuthenticationUser con il nome specificato.

Item[Int32]

Ottiene FormsAuthenticationUser in corrispondenza dell'indice specificato.

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

Parametri

index
Int32

Indice dell'utente nell'insieme.

Valore della proprietà

Oggetto FormsAuthenticationUser contenente il nome utente e la password.

Esempio

Nell'esempio di codice seguente viene illustrato come accedere alle credenziali di un utente nell'indice specificato.

// 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)

Si applica a

Item[String]

Ottiene FormsAuthenticationUser con il nome specificato.

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

Parametri

name
String

Nome dell'utente.

Valore della proprietà

Oggetto FormsAuthenticationUser contenente il nome utente e la password.

Esempio

Nell'esempio di codice seguente viene illustrato come accedere alle credenziali di un utente con il nome specificato.

// 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")

Si applica a