FormsAuthenticationUserCollection.GetKey(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得位於指定 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)