NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Encoding.GetEncoder

Returns an encoder object for this instance of encoding. The encoder object can be used to encode a sequence of characters into bytes.

[Visual Basic]
Overridable Public 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.

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 simply forwards calls to GetByteCount and GetBytes to the corresponding methods of this encoding. Encoding that requires the state to be maintained between successive conversions should override this method and return an instance of an appropriate Encoder implementation.

See Also

Encoding Class | Encoding Members | System.Text Namespace