A common task when calling web resources from a code is building a query string to including all the necessary parameters. While by all means no rocket science, there are so
This is the identical to the accepted answer except slightly more compact:
private string ToQueryString(NameValueCollection nvc) { return "?" + string.Join("&", nvc.AllKeys.Select(k => string.Format("{0}={1}", HttpUtility.UrlEncode(k), HttpUtility.UrlEncode(nvc[k])))); }