Share via


FormsAuthenticationUserCollection.Item[] Propiedad

Definición

Obtiene el elemento de la colección de FormsAuthenticationUser especificado.

Sobrecargas

Item[Int32]

Obtiene el objeto FormsAuthenticationUser en el índice especificado.

Item[String]

Obtiene el objeto FormsAuthenticationUser con el nombre especificado.

Item[Int32]

Obtiene el objeto FormsAuthenticationUser en el índice especificado.

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

Índice de usuario de la colección.

Valor de propiedad

Un objeto FormsAuthenticationUser que contiene el nombre de usuario y la contraseña.

Ejemplos

En el ejemplo de código siguiente se muestra cómo acceder a las credenciales de un usuario en el índice especificado.

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

Se aplica a

Item[String]

Obtiene el objeto FormsAuthenticationUser con el nombre especificado.

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

Nombre del usuario.

Valor de propiedad

Un objeto FormsAuthenticationUser que contiene el nombre de usuario y la contraseña.

Ejemplos

En el ejemplo de código siguiente se muestra cómo acceder a las credenciales de un usuario con el nombre especificado.

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

Se aplica a