NameValueCollection.AllKeys NameValueCollection.AllKeys NameValueCollection.AllKeys NameValueCollection.AllKeys Property

定義

取得 NameValueCollection 中的所有索引鍵。Gets all the keys in the NameValueCollection.

public:
 virtual property cli::array <System::String ^> ^ AllKeys { cli::array <System::String ^> ^ get(); };
public virtual string[] AllKeys { get; }
member this.AllKeys : string[]
Public Overridable ReadOnly Property AllKeys As String()

屬性值

String[]

String 陣列,包含 NameValueCollection 中所有的索引鍵。A String array that contains all the keys of the NameValueCollection.

備註

如果集合是空的這個方法會傳回空白String陣列,不nullIf the collection is empty, this method returns an empty String array, not null.

傳回的陣列AllKeys快取以提升效能,當集合變更時,會自動重新整理。The arrays returned by AllKeys are cached for better performance and are automatically refreshed when the collection changes. 在衍生的類別可以讓快取的版本失效藉由呼叫InvalidateCachedArrays,藉此強制重新建立陣列。A derived class can invalidate the cached version by calling InvalidateCachedArrays, thereby forcing the arrays to be recreated.

這個方法是 O (n) 運算,其中nCountThis method is an O(n) operation, where n is Count.

適用於

另請參閱