FormsAuthenticationUserCollection.Get Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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
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
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)