Skip to content
Discussion options

You must be logged in to vote
var rootUri = new Uri(@"c:\webroot\");
var fullUri = new Uri(@"c:\webroot\dir1\test.gif");
var relativeUri = rootUri.MakeRelativeUri(fullUri);

Console.WriteLine(relativeUri); // => dir1/test.gif

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@lbgitjp
Comment options

Comment options

You must be logged in to vote
1 reply
@lbgitjp
Comment options

Answer selected by lbgitjp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants