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 會解碼為 字元 <>

適用於