This documentation is archived and is not being maintained.

NameValueCollection.InvalidateCachedArrays Method

Resets the cached arrays of the collection to a null reference (Nothing in Visual Basic).

[Visual Basic]
Protected Sub InvalidateCachedArrays()
protected void InvalidateCachedArrays();
protected: void InvalidateCachedArrays();
protected function InvalidateCachedArrays();


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


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

NameValueCollection Class | NameValueCollection Members | System.Collections.Specialized Namespace | AllKeys