語言

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 會被解碼成字元 < 和 >。

適用於