In the comments to this question it was noted that it was not always possible to convert a file path to the URI string by means of System.Uri class. This leaves a question: how can one represent an arbitrary file path as System.Uri?
Here are some details. If an app is targeting .Net version below 4.5, than the System.Uri constructors do not try to unescape the original string, even if .Net 4.5+ is installed. So the question relates to the code targeting .Net 4.5+. In those later versions, any method of creating a System.Uri instance from a string ends up in some messy internal code trying to "escape-unescape" the input. The result is that '%25' is never unescaped, but '%' followed by two hexadecimal digits coding any non-special ASCII character is always unescaped. For example,
var uri = new System.Uri(@"C:\%51.txt");
gives a uri with uri.LocalPath == @"C:\Q.txt", and
var uri = new System.Uri(@"C:\%2551.txt");
creates a uri with uri.LocalPath == @"C:\%2551.txt".
At first glance, it seems to be impossible to convert pretty valid local file name '%51.txt' to an equivalent System.Uri. But maybe someone knows a way?