Share via


FormsAuthenticationUserCollection.GetKey(Int32) メソッド

定義

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

public:
 System::String ^ GetKey(int index);
public string GetKey (int index);
member this.GetKey : int -> string
Public Function GetKey (index As Integer) As String

パラメーター

index
Int32

コレクション内のインデックス。

戻り値

FormsAuthenticationUserCollection の指定したインデックスにあるキー。

GetKey メソッドを使用するコード例を次に示します。

// Get the key at the specified index.
string thisKey = formsAuthenticationCredentials.Users.GetKey(0).ToString();
' Get the key at the specified index.
  Dim thisKey As String = _
  formsAuthenticationCredentials.Users.GetKey(0)

適用対象