Compartir a través de


Url.MakeRelative Method

Makes the specified Url relative with respect to the current one.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Declaración
Public Function MakeRelative ( _
    url As Url _
) As String
'Uso
Dim instance As Url
Dim url As Url
Dim returnValue As String

returnValue = instance.MakeRelative(url)
public string MakeRelative(
    Url url
)
public:
String^ MakeRelative(
    Url^ url
)
member MakeRelative : 
        url:Url -> string 
public function MakeRelative(
    url : Url
) : String

Parameters

Return Value

Type: System.String
Using the current Url as the base, the relative path of url.

Remarks

If the scheme or host properties are different (comparing url to the current Url), this method returns the absolute path of url. Otherwise, it returns the unescaped relative path.

.NET Framework Security

See Also

Reference

Url Class

Url Members

Microsoft.VisualStudio.Shell Namespace