語言

HostString.ToUriComponent 方法

定義

以 HTTP 標頭回傳格式正確且編碼好的 URI 值。 任何 Unicode 都會被轉換成 punycode。 如果缺少 IPv6 位址,會加上括號。

public:
 System::String ^ ToUriComponent();
public string ToUriComponent();
member this.ToUriComponent : unit -> string
Public Function ToUriComponent () As String

傳回

該值格式 HostString 化為用於 URI 或 HTTP 標頭。

適用於