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
In dotnet core QueryHelpers.AddQueryString() will accept an IDictionary of key-value pairs. To save a few memory allocs and CPU cycles you can use SortedList<,> instead of IDictionary<,>, with an appropriate capacity and items added in sort order...
var queryParams = new SortedList(2);
queryParams.Add("abc", "val1");
queryParams.Add("def", "val2");
string requestUri = QueryHelpers.AddQueryString("https://localhost/api", queryParams);