Wednesday, 20 September 2017

Convert file path to a file URI?

The System.Uri constructor has the ability to parse full file paths and turn them into URI style paths. So you can just do the following:
var uri = new System.Uri("c:\\foo");
var converted = uri.AbsoluteUri;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive