FormsAuthenticationUserCollection.Get Method

Definition

Gets the specified FormsAuthenticationUser collection element.

Overloads

Get(String)

Gets the FormsAuthenticationUser collection element with the specified name.

Get(Int32)

Gets the FormsAuthenticationUser collection element at the specified index.

Get(String)

Gets the FormsAuthenticationUser collection element with the specified name.

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

Parameters

name
String

The user's name.

Returns

A FormsAuthenticationUser object that contains the user name and password.

Examples

The following code example shows how to access credentials of a user with the specified name.

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

Applies to

Get(Int32)

Gets the FormsAuthenticationUser collection element at the specified index.

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

Parameters

index
Int32

The collection user's index.

Returns

A FormsAuthenticationUser that contains the user name and password.

Examples

The following code example shows how to access credentials of a user at the specified index.

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

Applies to