Я завернул ответ Дарина в метод многократного повторного использования.
public static class UriExtensions
{
///
/// Adds the specified parameter to the Query String.
///
///
/// Name of the parameter to add.
/// Value for the parameter to add.
/// Url with added parameter.
public static Uri AddParameter(this Uri url, string paramName, string paramValue)
{
var uriBuilder = new UriBuilder(url);
var query = HttpUtility.ParseQueryString(uriBuilder.Query);
query[paramName] = paramValue;
uriBuilder.Query = query.ToString();
return uriBuilder.Uri;
}
}
Надеюсь, это поможет!