NameValueCollection.InvalidateCachedArrays 方法

定義

將集合的快取陣列重設為 nullResets the cached arrays of the collection to null.

protected:
 void InvalidateCachedArrays();
protected void InvalidateCachedArrays ();
member this.InvalidateCachedArrays : unit -> unit
Protected Sub InvalidateCachedArrays ()

備註

所傳回的陣列 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 (1) 作業。This method is an O(1) operation.

適用於

另請參閱