Uri.EscapeString(String) Metodo

Definizione

Attenzione

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

Attenzione

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 una stringa nella relativa rappresentazione escape.Converts a string to its escaped representation.

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("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
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
Protected Shared Function EscapeString (str As String) As String

Parametri

str
String

Stringa da trasformare nella rispettiva rappresentazione escape.The string to transform to its escaped representation.

Restituisce

String

Rappresentazione escape della stringa.The escaped representation of the string.

Attributi

Commenti

Il EscapeString metodo converte i caratteri riservati RFC 2396 e tutti i caratteri con un valore di carattere maggiore di 127 per la rappresentazione esadecimale.The EscapeString method converts RFC 2396 reserved characters and all characters with a character value greater than 127 to hexadecimal representation. Tutti i caratteri Unicode vengono convertiti in formato UTF-8 prima di essere preceduti da un carattere di escape.All Unicode characters are converted to UTF-8 format before being escaped.

Per impostazione predefinita, la stringa viene sottoposta a escape in base allo standard RFC 2396.By default, the string is escaped according to RFC 2396. Se è abilitata l'analisi degli identificatori di risorsa internazionali (IRIs) o del nome di dominio internazionale (IDN), la stringa viene sottoposta a escape in base a RFC 3986 e RFC 3987.If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987.

Per ulteriori informazioni sul supporto di IRI, vedere la sezione Osservazioni relativa alla Uri classe.For more information on IRI support, see the Remarks section for the Uri class.

Si applica a