CollectionExtensions.AsQueryString Method

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

AsQueryString(NameValueCollection, bool, bool)

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
bool
addSeparator
bool

Returns

string

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