Share via


FormsAuthenticationUserCollection.Item[] Propriété

Définition

Obtient l'élément de collection FormsAuthenticationUser spécifié.

Surcharges

Item[Int32]

Obtient l'objet FormsAuthenticationUser à l'index spécifié.

Item[String]

Obtient l'objet FormsAuthenticationUser portant le nom spécifié.

Item[Int32]

Obtient l'objet FormsAuthenticationUser à l'index spécifié.

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

Paramètres

index
Int32

Index de l'utilisateur de collection.

Valeur de propriété

FormsAuthenticationUser qui contient le nom d'utilisateur et le mot de passe.

Exemples

L’exemple de code suivant montre comment accéder aux informations d’identification d’un utilisateur à l’index spécifié.

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

S’applique à

Item[String]

Obtient l'objet FormsAuthenticationUser portant le nom spécifié.

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

Paramètres

name
String

Nom de l'utilisateur.

Valeur de propriété

Objet FormsAuthenticationUser qui contient le nom d'utilisateur et le mot de passe.

Exemples

L’exemple de code suivant montre comment accéder aux informations d’identification d’un utilisateur portant le nom spécifié.

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

S’applique à