Constructors: NewUnicodeEncoding

NewUnicodeEncoding

Returns a new UnicodeEncoding object with the specified settings.



 Public Function NewUnicodeEncoding(
	  ByVal BigEndian As Boolean,
	  ByVal ByteOrderMark As Boolean,
	  Optional ByVal ThrowOnInvalidBytes As Boolean ) As UnicodeEncoding

Parameters

BigEndian
[ByVal] Boolean. True to use the big endian byte order (most significant byte first), or False to use the little endian byte order (least significant byte first).
ByteOrderMark
[ByVal] Boolean. True to specify that the GetPreamble method returns a Unicode byte order mark; otherwise, False. See the Remarks section for more information.
ThrowOnInvalidBytes
[ByVal] Optional. Boolean. True to specify that an exception should be thrown when an invalid encoding is detected; otherwise, False.

Return Values

UnicodeEncoding -  The new UnicodeEncoding object.

Remarks

If ByteOrderMark is True then the GetPreamble will emit one of the following byte arrays.

BigEnding = True: &HFE, &HFF
BigEnding = False: &HFF, &HFE

If ByteOrderMark is False then GetPreamble will emit an empty array.

See Also

Project CorLib Overview

Class Constructors Overview