Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NameValueCollection::AllKeys Property

 

Gets all the keys in the NameValueCollection.

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

public:
property array<String^>^ AllKeys {
	virtual array<String^>^ get();
}

Property Value

Type: array<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:
© 2017 Microsoft