Export (0) Print
Expand All

Encoding.GetEncoder Method

An Encoder for this encoding.

[Visual Basic]
Public Overridable Function GetEncoder() As Encoder
[C#]
public virtual Encoder GetEncoder();
[C++]
public: virtual Encoder* GetEncoder();
[JScript]
public function GetEncoder() : Encoder;

Return Value

An Encoder for this encoding. The Encoder can be used to encode a sequence of characters into bytes.

Remarks

Contrary to GetBytes, an Encoder can convert partial sequences of characters into partial sequences of bytes by maintaining the appropriate state between the conversions.

This default implementation returns an Encoder that forwards calls to GetByteCount and GetBytes 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 Encoder implementation.

Requirements

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

Show:
© 2015 Microsoft