Partager via


PackageUtilities.MakeRelative Method

Returns a path for the second file that's relative to the path of the first.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function MakeRelative ( _
    filename As String, _
    filename2 As String _
) As String
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: String

    The base path.

  • filename2
    Type: String

    The relative path.

Return Value

Type: 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

See Also

Reference

PackageUtilities Class

Microsoft.VisualStudio.Shell Namespace