private GetRelativePath ( string fullPath, string basePath ) : string | ||
fullPath | string | |
basePath | string | |
return | string |
string GetRelativePath(string fullPath, string basePath)
{
if(!basePath.EndsWith(@"\"))
basePath += @"\";
var relativeUri = new Uri(basePath).MakeRelativeUri(new Uri(fullPath));
return relativeUri.ToString().Replace("/", @"\");
}