Create a new instance of the Decoder class. : Decoder « Development Class « C# / C Sharp






Create a new instance of the Decoder class.

 

using System;
using System.Text;

class EncoderExample {
    public static void Main() {

        UnicodeEncoding uni = new UnicodeEncoding();
        Decoder dec1 = uni.GetDecoder();

        Decoder dec2 = Encoding.Unicode.GetDecoder();

        Console.WriteLine(dec1.ToString());
        Console.WriteLine(dec2.ToString());

        Console.WriteLine(dec1.GetHashCode());
        Console.WriteLine(dec2.GetHashCode());
    }
}

   
  








Related examples in the same category

1.Converts a sequence of encoded bytes into a set of characters.
2.Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
3.Decode a sequence of bytes from the specified byte array