共用方式為


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)

適用於