共用方式為


PackageUtilities.GetPathDistance Method

Calculates the distance between two paths.

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

Syntax

'Declaration
Public Shared Function GetPathDistance ( _
    uriBase As Uri, _
    uriRelativeTo As Uri _
) As String
public static string GetPathDistance(
    Uri uriBase,
    Uri uriRelativeTo
)
public:
static String^ GetPathDistance(
    Uri^ uriBase, 
    Uri^ uriRelativeTo
)
static member GetPathDistance : 
        uriBase:Uri * 
        uriRelativeTo:Uri -> string
public static function GetPathDistance(
    uriBase : Uri, 
    uriRelativeTo : Uri
) : String

Parameters

  • uriBase
    Type: Uri

    The base Uri.

  • uriRelativeTo
    Type: Uri

    The relative Uri.

Return Value

Type: String
The relative path.

Remarks

This method returns an unescaped string version of the URI that's returned by MakeRelativeUri if the paths overlap (have the same root), and the path of the relative URI if they do not.

.NET Framework Security

See Also

Reference

PackageUtilities Class

Microsoft.VisualStudio.Shell Namespace