FormsAuthenticationUserCollection.Item[] Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Získá zadanou FormsAuthenticationUser položku kolekce.
Přetížení
Item[Int32] |
Získá hodnotu FormsAuthenticationUser v zadaném indexu. |
Item[String] |
FormsAuthenticationUser Získá zadaný název. |
Item[Int32]
Získá hodnotu FormsAuthenticationUser v zadaném indexu.
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
Parametry
- index
- Int32
Index uživatele kolekce.
Hodnota vlastnosti
A FormsAuthenticationUser obsahující uživatelské jméno a heslo.
Příklady
Následující příklad kódu ukazuje, jak získat přístup k přihlašovacím údajům uživatele v zadaném indexu.
// 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)
Platí pro
Item[String]
FormsAuthenticationUser Získá zadaný název.
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
Parametry
- name
- String
Jméno uživatele.
Hodnota vlastnosti
Objekt FormsAuthenticationUser , který obsahuje uživatelské jméno a heslo.
Příklady
Následující příklad kódu ukazuje, jak získat přístup k přihlašovacím údajům uživatele se zadaným názvem.
// 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")