Url.MakeRelative(Url) 方法

定义

使指定 Url 相对于当前的相对于。

public:
 System::String ^ MakeRelative(Microsoft::VisualStudio::Shell::Url ^ url);
std::wstring MakeRelative(Microsoft::VisualStudio::Shell::Url const & url);
public string MakeRelative (Microsoft.VisualStudio.Shell.Url url);
member this.MakeRelative : Microsoft.VisualStudio.Shell.Url -> string
Public Function MakeRelative (url As Url) As String

参数

url
Url

Url要使其成为相对的。

返回

String

使用 current Url 作为基,即的相对路径 url

注解

如果 (与当前) 进行比较的方案或主机属性不同 url Url ,则此方法返回的绝对路径 url. ,否则返回非转义的相对路径。

适用于