语言

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 标头的值。

适用于