Uri.EscapeString(String) 方法

定义

注意

The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202

注意

Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.

注意

Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.

注意

The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202

将字符串转换为它的转义表示形式。

protected:
 static System::String ^ EscapeString(System::String ^ str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString (string? str);
[System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.")]
protected static string EscapeString (string? str);
[System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")]
protected static string EscapeString (string? str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString (string str);
protected static string EscapeString (string str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString (string str);
[<System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member EscapeString : string -> string
[<System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.")>]
static member EscapeString : string -> string
[<System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")>]
static member EscapeString : string -> string
[<System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member EscapeString : string -> string
static member EscapeString : string -> string
Protected Shared Function EscapeString (str As String) As String

参数

str
String

要转换为它的转义表示形式的字符串。

返回

字符串的转义表示形式。

属性

注解

方法 EscapeString 将 RFC 2396 保留字符和字符值大于 127 的所有字符转换为十六进制表示形式。 在转义之前,所有 Unicode 字符都转换为 UTF-8 格式。

默认情况下,字符串根据 RFC 2396 进行转义。 如果启用了国际资源标识符 (I RI) 或国际化域名 (IDN) 分析,则会根据 RFC 3986 和 RFC 3987 转义字符串。

有关 IRI 支持的详细信息,请参阅 类的 Uri “备注”部分。

适用于