PackageUtilities.MakeRelative(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a path for the second file that's relative to the path of the first.
public:
static System::String ^ MakeRelative(System::String ^ filename, System::String ^ filename2);
public:
static Platform::String ^ MakeRelative(Platform::String ^ filename, Platform::String ^ filename2);
static std::wstring MakeRelative(std::wstring const & filename, std::wstring const & filename2);
public static string MakeRelative (string filename, string filename2);
static member MakeRelative : string * string -> string
Public Function MakeRelative (filename As String, filename2 As String) As String
Parameters
- filename
- String
The base path.
- filename2
- String
The relative path.
Returns
The relative path of the second file.
Remarks
If the filename
and filename2
overlap (have the same root), returns a relative path of the form "..\". If the two paths are completely distinct, returns filename2.