title: Convert file path to a file URI?
body: <p>Does the .NET Framework have any methods for converting a path (e.g. <code>"C:\whatever.txt"</code>) into a file URI (e.g. <code>"file:///C:/whatever.txt"</code>)?</p>
  
  <p>The <a href="https://msdn.microsoft.com/en-us/library/system.uri%28v=vs.110%29.aspx" rel="noreferrer">System.Uri</a> class has the reverse (from a file URI to absolute path), but nothing as far as I can find for converting to a file URI.</p>
  
  <p>Also, this is <strong>not</strong> an ASP.NET application.</p>