Uri.Escape 方法

定义

注意

The method has been deprecated. It is not used by the system. https://go.microsoft.com/fwlink/?linkid=14202

注意

Uri.Escape has been deprecated and is not supported.

注意

The method has been deprecated. It is not used by the system. http://go.microsoft.com/fwlink/?linkid=14202

将路径部分中的任何不安全字符或保留字符转换为对应的十六进制字符表示形式。

C#
[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 ();
C#
[System.Obsolete("Uri.Escape has been deprecated and is not supported.")]
protected virtual void Escape ();
C#
[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 ();
C#
protected virtual void Escape ();
属性

例外

从构造函数传来的 URI 无效。 如果 URI 字符太多或 URI 是相对的,则会发生这种异常。

适用于

产品 版本 (已过时)
.NET (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7)
.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, 4.7.1, 4.7.2, 4.8)
.NET Standard (2.0, 2.1)