Syntax:
public static string GetShortestRelativePath(
string path,
string baseDirectory
)
Parameters:
path
A path (either rooted or relative to the current directory) to some file or directory.
baseDirectory
A path (either rooted or relative to the current directory) to some directory.
Return Value:
The shortest relative path from baseDirectory to path.
Exceptions:
ArgumentException
path is on a different volume than baseDirectory.