Create a new instance of the Encoder class
using System;
using System.Text;
class EncoderExample {
public static void Main() {
UnicodeEncoding uni = new UnicodeEncoding();
Encoder enc1 = uni.GetEncoder();
Encoder enc2 = Encoding.Unicode.GetEncoder();
Console.WriteLine(enc1.ToString());
Console.WriteLine(enc2.ToString());
Console.WriteLine(enc1.GetHashCode());
Console.WriteLine(enc2.GetHashCode());
}
}
Related examples in the same category