Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Combine Key-Value Dictionary to Query String Parameters (WIP: Could use improvements)
public static class Extensions
{
public static string CombineToQuerystring(this Dictionary<string, string> Components)
{
List<string> objStrings = new List<string>();
foreach (var objParam in Components)
objStrings.Add(string.Format(@"{0}={1}", objParam.Key, objParam.Value));
return string.Join("&", objStrings.ToArray());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.