ASCIIEncoding.GetDecoder 方法

定義

取得一個解碼器,能將 ASCII 編碼的位元組序列轉換成 Unicode 字元序列。

public:
 override System::Text::Decoder ^ GetDecoder();
public override System.Text.Decoder GetDecoder();
[System.Runtime.InteropServices.ComVisible(false)]
public override System.Text.Decoder GetDecoder();
override this.GetDecoder : unit -> System.Text.Decoder
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.GetDecoder : unit -> System.Text.Decoder
Public Overrides Function GetDecoder () As Decoder

傳回

Decoder A 將 ASCII 編碼的位元組序列轉換成 Unicode 字元序列。

屬性

備註

Decoder.GetChars 方法將連續的位元組區塊轉換為連續的字元區塊, GetChars 方式類似於此類別的方法。 然而,a Decoder 會維持呼叫間的狀態資訊,以便正確解碼跨區塊的位元組序列。 同時 Decoder 會保留資料區塊末尾的尾部位元組,並在下一次解碼操作中使用這些尾部位元組。 因此, GetDecoderGetEncoder 對於網路傳輸和檔案操作非常有用,因為這些操作通常處理的是資料區塊,而非完整的資料流。

適用於

另請參閱