NameValueCollection.GetKey(Int32) 方法

定義

取得 NameValueCollection 之指定索引處的索引鍵。Gets the key at the specified index of the NameValueCollection.

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

參數

index
Int32

從集合取得的以零起始的索引鍵索引。The zero-based index of the key to get from the collection.

傳回

String

String,包含 NameValueCollection 之指定索引處的索引鍵 (如果找到的話),否則為 nullA String that contains the key at the specified index of the NameValueCollection, if found; otherwise, null.

例外狀況

index 超出集合索引的有效範圍。index is outside the valid range of indexes for the collection.

備註

這個方法是 O (1) 作業。This method is an O(1) operation.

適用於

另請參閱