NameValueCollection.AllKeys Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets all the keys in the NameValueCollection.

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

public virtual string[] AllKeys { 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: