FormsAuthenticationUserCollection.Get メソッド

定義

指定された FormsAuthenticationUser コレクション要素を取得します。

オーバーロード

Get(String)

指定した名前の FormsAuthenticationUser コレクション要素を取得します。

Get(Int32)

指定したインデックス位置にある FormsAuthenticationUser コレクション要素を取得します。

Get(String)

指定した名前の FormsAuthenticationUser コレクション要素を取得します。

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

パラメーター

name
String

ユーザーの名前。

戻り値

FormsAuthenticationUser

ユーザーの名前とパスワードが格納される FormsAuthenticationUser オブジェクト。

次のコード例は、指定した名前のユーザーの資格情報にアクセスする方法を示しています。

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

適用対象

Get(Int32)

指定したインデックス位置にある FormsAuthenticationUser コレクション要素を取得します。

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

パラメーター

index
Int32

コレクション ユーザーのインデックス。

戻り値

FormsAuthenticationUser

ユーザーの名前とパスワードが格納される FormsAuthenticationUser

次のコード例は、指定したインデックスにあるユーザーの資格情報にアクセスする方法を示しています。

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

適用対象