This documentation is archived and is not being maintained.

Encoding.GetDecoder Method

Returns a Decoder for this encoding.

[Visual Basic]
Public Overridable Function GetDecoder() As Decoder
public virtual Decoder GetDecoder();
public: virtual Decoder* GetDecoder();
public function GetDecoder() : Decoder;

Return Value

Returns a Decoder for this encoding. The Decoder can be used to decode a sequence of bytes into characters.


Contrary to the GetChars methods, a Decoder can convert partial sequences of bytes into partial sequences of characters by maintaining the appropriate state between the conversions.

This default implementation returns a Decoder that forwards calls to the GetCharCount and GetChars methods to the corresponding methods of this encoding. Encodings that require state to be maintained between successive conversions can override this method and return an instance of an appropriate Decoder implementation.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Encoding Class | Encoding Members | System.Text Namespace | GetCharCount | GetChars