Ler em inglês

Compartilhar via


Uri.EscapeString(String) Método

Definição

Cuidado

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

Cuidado

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

Cuidado

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

Cuidado

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

Converte uma cadeia de caracteres em sua representação de escape.

C#
[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);
C#
[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);
C#
[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);
C#
[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);
C#
protected static string EscapeString(string str);
C#
[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);

Parâmetros

str
String

A cadeia de caracteres a ser transformada em sua representação de escape.

Retornos

A representação de escape da cadeia de caracteres.

Atributos

Comentários

O EscapeString método converte caracteres reservados RFC 2396 e todos os caracteres com um valor de caractere maior que 127 em representação hexadecimal. Todos os caracteres Unicode são convertidos no formato UTF-8 antes de serem escapados.

Por padrão, a cadeia de caracteres é escapada de acordo com RFC 2396. Se a análise de IRIs (Identificadores de Recursos Internacionais) ou IDN (Nome de Domínio Internacionalizado) estiver habilitada, a cadeia de caracteres será escapada de acordo com RFC 3986 e RFC 3987.

Para obter mais informações sobre o suporte IRI, consulte a seção Comentários da classe Uri.

Aplica-se a

Produto Versões (Obsoleto)
.NET (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1)
.NET Standard (2.0, 2.1)