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 ASCII 编码的字节序列转换为 Unicode 字符序列。

属性

注解

该方法 Decoder.GetChars 以类似于 GetChars 此类的方法将连续字节块转换为顺序字符块。 但是,在 Decoder 调用之间维护状态信息,以便它可以正确解码跨块的字节序列。 它还 Decoder 保留数据块末尾的尾随字节,并在下一个解码操作中使用尾随字节。 因此, GetDecoder 对于 GetEncoder 网络传输和文件操作非常有用,因为这些操作通常处理数据块而不是完整的数据流。

适用于

另请参阅