WebUtility.UrlDecodeToBytes(Byte[], Int32, Int32) 方法

定义

将为通过 URL 传输已编码的已编码字节数组转换为解码的字节数组。

public:
 static cli::array <System::Byte> ^ UrlDecodeToBytes(cli::array <System::Byte> ^ encodedValue, int offset, int count);
public static byte[] UrlDecodeToBytes (byte[] encodedValue, int offset, int count);
public static byte[]? UrlDecodeToBytes (byte[]? encodedValue, int offset, int count);
static member UrlDecodeToBytes : byte[] * int * int -> byte[]
Public Shared Function UrlDecodeToBytes (encodedValue As Byte(), offset As Integer, count As Integer) As Byte()

参数

encodedValue
Byte[]

要进行解码的 URL 编码的 Byte 数组。

offset
Int32

相对于要解码的 Byte 数组的开头的偏移量(以字节为单位)。

count
Int32

要从 Byte 数组解码的计数(以字节为单位)。

返回

Byte[]

一个已解码的 Byte 数组。

注解

如果在 HTTP 流中传递空格和标点符号等字符,则可能在接收端被错误解释。 URL 编码将 URL 中不允许的字符转换为等效的十六进制转义序列。 方法 UrlEncodeToBytes 创建 URL 编码的字节数组。

URL 解码将十六进制转义序列替换为相应的 ASCII 字符等效项。 例如,在 URL 编码文本块中嵌入时,转义序列 %3c%3e 将解码为字符 <>

适用于