NameValueCollection.AllKeys Property

 

Gets all the keys in the NameValueCollection.

Namespace:   System.Collections.Specialized
Assembly:  System (in System.dll)

abstract AllKeys : string[] with get
override AllKeys : string[] with get

Property Value

Type: System.String[]

A String array that contains all the keys of the NameValueCollection.

If the collection is empty, this method returns an empty String array, not null.

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.

This method is an O(n) operation, where n is Count.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: