C# UnicodeEncoding UnicodeEncoding(Boolean, Boolean)

Description

UnicodeEncoding UnicodeEncoding(Boolean, Boolean) Initializes a new instance of the UnicodeEncoding class. Parameters specify whether to use the big endian byte order and whether to provide a Unicode byte order mark.

Syntax

UnicodeEncoding.UnicodeEncoding(Boolean, Boolean) has the following syntax.


public UnicodeEncoding(
  bool bigEndian,
  bool byteOrderMark
)

Parameters

UnicodeEncoding.UnicodeEncoding(Boolean, Boolean) has the following parameters.

  • bigEndian - 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 - true to specify that a Unicode byte order mark is provided; otherwise, false.

Example


using System;/*from ww w.  ja  v a  2  s.c om*/
using System.Text;

class UnicodeEncodingExample {
    public static void Main() {
        UnicodeEncoding unicode = new UnicodeEncoding();

        UnicodeEncoding unicodeLittleEndianBOM = new UnicodeEncoding(false, true);
    }
}




















Home »
  C# Tutorial »
    System.Text »




ASCIIEncoding
Encoding
EncodingInfo
StringBuilder
UnicodeEncoding
UTF8Encoding