NameValueCollection.InvalidateCachedArrays NameValueCollection.InvalidateCachedArrays NameValueCollection.InvalidateCachedArrays NameValueCollection.InvalidateCachedArrays Method

定義

將集合的快取陣列重設為 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.

適用於

另請參閱