Click or drag to resize
QueryCollectionExtensionsToNameValueCollection Method
Converts to NameValueCollection as a copy. The StringValues values of the collection are copied by implicit conversion to String.

Namespace: CMS.Base.Internal
Assembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax
C#
public static NameValueCollection ToNameValueCollection(
	this IQueryCollection queryCollection
)

Parameters

queryCollection
Type: CMS.Base.InternalIQueryCollection
The query collection.

Return Value

Type: NameValueCollection
New NameValueCollection that is a copy of the queryCollection keys and values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The StringValues value of the collection is copied with implicit operator because it converts to comma separated string of the original values. This is for our purposes sufficient, since the Get method over NameValueCollection converts all values assigned to a key to a comma separated string.
See Also