using System;
public class Program
{
public static void Main()
var part1 = new Uri("C:\\temp\\"); // double encodes when combining parts
var part2 = "assets/Image%20File.jpg";
var uri = new Uri(part1, part2);
uri.Dump();
uri.ToString().Dump(); // still encoded and shouldn't be
uri.AbsoluteUri.Dump(); // %2520 error
uri.LocalPath.Dump(); // still encoded and shouldn't be
part1 = new Uri("file:///C:\\temp\\"); // this works as expected
uri = new Uri(part1, part2);
uri.ToString().Dump(); // raw but unencoded
uri.AbsoluteUri.Dump(); // raw and encoded
uri.LocalPath.Dump(); // unencoded as local file path
}