Compartilhar via


FormsAuthenticationUserCollection.Get Método

Definição

Obtém o elemento da coleção FormsAuthenticationUser especificado.

Sobrecargas

Get(String)

Obtém o elemento da coleção FormsAuthenticationUser com o nome especificado.

Get(Int32)

Obtém o elemento da coleção FormsAuthenticationUser no índice especificado.

Get(String)

Obtém o elemento da coleção FormsAuthenticationUser com o nome especificado.

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

Parâmetros

name
String

O nome do usuário.

Retornos

FormsAuthenticationUser

Um objeto FormsAuthenticationUser que contém o nome de usuário e senha.

Exemplos

O exemplo de código a seguir mostra como acessar credenciais de um usuário com o nome especificado.

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

Aplica-se a

Get(Int32)

Obtém o elemento da coleção FormsAuthenticationUser no índice especificado.

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

Parâmetros

index
Int32

O índice do usuário da coleção.

Retornos

FormsAuthenticationUser

Um FormsAuthenticationUser que contém o nome de usuário e senha.

Exemplos

O exemplo de código a seguir mostra como acessar credenciais de um usuário no índice especificado.

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

Aplica-se a