Condividi tramite


FormsAuthenticationUserCollection.Get Metodo

Definizione

Ottiene l'elemento dell'insieme FormsAuthenticationUser specificato.

Overload

Get(String)

Ottiene l'elemento dell'insieme FormsAuthenticationUser con il nome specificato.

Get(Int32)

Ottiene l'elemento dell'insieme FormsAuthenticationUser in corrispondenza dell'indice specificato.

Get(String)

Ottiene l'elemento dell'insieme FormsAuthenticationUser con il nome specificato.

public:
 System::Web::Configuration::FormsAuthenticationUser ^ Get(System::String ^ name);
public System.Web.Configuration.FormsAuthenticationUser Get (string name);
member this.Get : string -> System.Web.Configuration.FormsAuthenticationUser
Public Function Get (name As String) As FormsAuthenticationUser

Parametri

name
String

Nome dell'utente.

Restituisce

FormsAuthenticationUser

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 with the specified name.
FormsAuthenticationUser storedUser = 
    formsAuthenticationCredentials.Users.Get("userName");
' Get the user with the specified name.
  Dim storedUser As FormsAuthenticationUser = _
  formsAuthenticationCredentials.Users.Get("userName")

Si applica a

Get(Int32)

Ottiene l'elemento dell'insieme FormsAuthenticationUser in corrispondenza dell'indice specificato.

public:
 System::Web::Configuration::FormsAuthenticationUser ^ Get(int index);
public System.Web.Configuration.FormsAuthenticationUser Get (int index);
member this.Get : int -> System.Web.Configuration.FormsAuthenticationUser
Public Function Get (index As Integer) As FormsAuthenticationUser

Parametri

index
Int32

Indice dell'utente nell'insieme.

Restituisce

FormsAuthenticationUser

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 at the specified index.
FormsAuthenticationUser storedUser2 = 
    formsAuthenticationCredentials.Users.Get(0);
' Get the user at the specified index.
  Dim storedUser2 As FormsAuthenticationUser = _
  formsAuthenticationCredentials.Users.Get(0)

Si applica a