Compartir a través de


FormsAuthenticationUserCollection.Get Método

Definición

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

Sobrecargas

Get(String)

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

Get(Int32)

Obtiene el elemento de la colección de FormsAuthenticationUser en el índice especificado.

Get(String)

Obtiene el elemento de la colección de FormsAuthenticationUser con el nombre 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

Nombre del usuario.

Devoluciones

FormsAuthenticationUser

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

Se aplica a

Get(Int32)

Obtiene el elemento de la colección de FormsAuthenticationUser en el í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

Índice de usuario de la colección.

Devoluciones

FormsAuthenticationUser

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

Se aplica a