Returns a path for the second file that is relative to the first.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public Shared Function MakeRelative ( _
filename As String, _
filename2 As String _
) As String
'使用
Dim filename As String
Dim filename2 As String
Dim returnValue As String
returnValue = PackageUtilities.MakeRelative(filename, _
filename2)
public static string MakeRelative(
string filename,
string filename2
)
public:
static String^ MakeRelative(
String^ filename,
String^ filename2
)
public static function MakeRelative(
filename : String,
filename2 : String
) : String
Parameters
filename
Type: System.StringThe base path.
filename2
Type: System.StringThe relative path.
Return Value
Type: System.String
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.