Converts the collection to an ILookup<(Of <(<'TKey, TElement>)>)>.

Namespace: DotNetNuke.Collections
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static ILookup<string, string> ToLookup(
	this NameValueCollection collection,
	bool splitValues
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ToLookup ( 
	collection As NameValueCollection,
	splitValues As Boolean
) As ILookup(Of String, String)

Parameters

collection
Type: System.Collections.Specialized..::..NameValueCollection
The collection.
splitValues
Type: System..::..Boolean
If true, treats values in the collection as comma-delimited lists of items (e.g. from a NameValueCollection)

Return Value

An ILookup<(Of <(<'TKey, TElement>)>)> instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type NameValueCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptioncollection is null

See Also