System.Collections.Specialized.NameValueCollection.InvalidateCachedArrays Method

Resets the cached arrays of the collection to null.

Syntax

protected void InvalidateCachedArrays ()

Remarks

The arrays returned by NameValueCollection.AllKeys are cached for better performance and are automatically refreshed when the collection changes. A derived class can invalidate the cached version by calling NameValueCollection.InvalidateCachedArrays, thereby forcing the arrays to be recreated.

This method is an O(1) operation.

Requirements

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0