new ASCIIEncoding
using System;
using System.Text;
class StringEncodingApp {
static void Main(string[] args) {
ASCIIEncoding ae = new ASCIIEncoding();
Console.WriteLine(ae.GetString(new byte[]{1,2,3}));
UnicodeEncoding bu = new UnicodeEncoding(true, false);
Console.WriteLine(bu.GetString(new byte[]{1,2,3}));
}
}
Related examples in the same category