Uri.EscapeString(String) Metod

Definition

Varning

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

Varning

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

Varning

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

Varning

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

Konverterar en sträng till dess undantagna representation.

protected:
 static System::String ^ EscapeString(System::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. 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("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("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. 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("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

Parametrar

str
String

Strängen som ska transformeras till dess undantagna representation.

Returer

Den undantagna representationen av strängen.

Attribut

Kommentarer

Metoden EscapeString konverterar reserverade RFC 2396-tecken och alla tecken med ett teckenvärde större än 127 till hexadecimal representation. Alla Unicode-tecken konverteras till UTF-8-format innan de tas bort.

Som standard är strängen undantagen enligt RFC 2396. Om international resource identifiers (IRIs) eller Internationalized Domain Name (IDN) parsning är aktiverad, är strängen undantagen enligt RFC 3986 och RFC 3987.

Mer information om IRI-stöd finns i avsnittet Anmärkningar för Uri klassen.

Gäller för