FormsAuthenticationUserCollection.Item[] Propriedade

Definição

Obtém o item da coleção FormsAuthenticationUser especificado.Gets the specified FormsAuthenticationUser collection item.

Sobrecargas

Item[Int32]

Obtém o FormsAuthenticationUser no índice especificado.Gets the FormsAuthenticationUser at the specified index.

Item[String]

Obtém o FormsAuthenticationUser com o nome especificado.Gets the FormsAuthenticationUser with the specified name.

Item[Int32]

Obtém o FormsAuthenticationUser no índice especificado.Gets the FormsAuthenticationUser at the specified index.

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

Parâmetros

index
Int32

O índice do usuário da coleção.The collection user's index.

Valor da propriedade

FormsAuthenticationUser

Um FormsAuthenticationUser que contém o nome de usuário e senha.A FormsAuthenticationUser that contains the user name and password.

Exemplos

O exemplo de código a seguir mostra como acessar as credenciais de um usuário no índice especificado.The following code example shows how to access the credentials of a user at the specified index.

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

Aplica-se a

Item[String]

Obtém o FormsAuthenticationUser com o nome especificado.Gets the FormsAuthenticationUser with the specified name.

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

Parâmetros

name
String

O nome do usuário.The user's name.

Valor da propriedade

FormsAuthenticationUser

Um objeto FormsAuthenticationUser que contém o nome de usuário e senha.A FormsAuthenticationUser object that contains the user name and password.

Exemplos

O exemplo de código a seguir mostra como acessar as credenciais de um usuário com o nome especificado.The following code example shows how to access the credentials of a user with the specified name.

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

Aplica-se a