Constructors: NewUTF8Encoding

NewUTF8Encoding

Returns a new UTF8Encoding object.



 Public Function NewUTF8Encoding(
	  ByVal ShouldEmitUTF8Identifier As Boolean,
	  Optional ByVal ThrowOnInvalidBytes As Boolean ) As UTF8Encoding

Parameters

ShouldEmitUTF8Identifier
[ByVal] Boolean. True to specify that a Unicode byte order mark is provided; otherwise, False.
ThrowOnInvalidBytes
[ByVal] Optional. Boolean. True to specify that an exception be thrown when an invalid encoding is detected; otherwise, False.

Return Values

UTF8Encoding -  The new UTF8Encoding object.

Remarks

If ThrowOnInvalidBytes is True, a method that detects an invalid byte sequence throws ArgumentException. Otherwise, the method does not throw an exception, and the invalid sequence is ignored.

See Also

Project CorLib Overview

Class Constructors Overview