PackageUtilities.MakeRelative Method
Returns a path for the second file that is relative to the first.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.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
)
static member MakeRelative :
filename:string *
filename2:string -> string
public static function MakeRelative(
filename : String,
filename2 : String
) : String
Parameters
- filename
Type: System.String
The base path.
- filename2
Type: System.String
The 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.
.NET Framework Security
- 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.