Method MakeRelativePath
MakeRelativePath(string, string)
Creates a relative path from one file or folder to another.
Declaration
public static string MakeRelativePath(string anchorPath, string pathToMakeRelative)
Parameters
| Type | Name | Description |
|---|---|---|
| string | anchorPath | The path we want to be relative to. |
| string | pathToMakeRelative | The path we want to make relative. |
Returns
| Type | Description |
|---|---|
| string | The resulting relative path. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | throw if either input paths are null. |