using System;
using System.Text;
class UnicodeEncodingExample {
public static void Main() {
Byte[] byteOrderMark = Encoding.Unicode.GetPreamble();
foreach (Byte b in byteOrderMark) {
Console.Write("[{0}]", b);
}
UnicodeEncoding bigEndianUnicode = new UnicodeEncoding(true, true);
byteOrderMark = bigEndianUnicode.GetPreamble();
foreach (Byte b in byteOrderMark) {
Console.Write("[{0}]", b);
}
}
}