CollectionExtensions.AsQueryString Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

AsQueryString(NameValueCollection, Boolean, Boolean)

Converts a NameValueCollection to a query string including the leading ? or &.

public static string AsQueryString(this NameValueCollection input, bool lowerCaseKeys = false, bool addSeparator = true)

Parameters

input
System.Collections.Specialized.NameValueCollection
lowerCaseKeys
System.Boolean
addSeparator
System.Boolean

Returns

System.String

A query string, or null if the input list is null or empty.