I am given an absolute URI that contains a query string. I\'m looking to safely append a value to the query string, and change an existing parameter.
I would prefer
It's important to note that in the time since the top answer has been flagged as correct that Microsoft.AspNetCore.WebUtilities has had a major version update (from 1.x.x to 2.x.x).
That said, if you're building against netcoreapp1.1 you will need to run the following, which installs the latest supported version 1.1.2:
Install-Package Microsoft.AspNetCore.WebUtilities -Version 1.1.2