Uri.Escape Method

Definition

Warning

This API is now obsolete.

將路徑元件中的任何不安全或保留字元轉換成十六進位字元表示。Converts any unsafe or reserved characters in the path component to their hexadecimal character representations.

protected:
 virtual void Escape();
[System.Obsolete("The method has been deprecated. It is not used by the system. https://go.microsoft.com/fwlink/?linkid=14202")]
protected virtual void Escape ();
[System.Obsolete("The method has been deprecated. It is not used by the system. http://go.microsoft.com/fwlink/?linkid=14202")]
protected virtual void Escape ();
[System.Obsolete("The method has been deprecated. It is not used by the system. https://go.microsoft.com/fwlink/?linkid=14202")]
[System.Obsolete("The method has been deprecated. It is not used by the system. https://go.microsoft.com/fwlink/?linkid=14202")]
protected virtual void Escape ();
protected virtual void Escape ();
abstract member Escape : unit -> unit
override this.Escape : unit -> unit
Protected Overridable Sub Escape ()
Attributes

Exceptions

從建構函式傳遞的 URI 無效。The URI passed from the constructor is invalid. 如果 URI 有太多字元或為相對 URI,就會發生這個例外狀況。This exception can occur if a URI has too many characters or the URI is relative.

Applies to