Encoding.ASCII.GetString : Encode « File Stream « C# / C Sharp






Encoding.ASCII.GetString

 
using System;
using System.Text;

class StringEncodingApp {
    static void Main(string[] args) {
        byte[] ba = new byte[] { 72, 101, 108, 108, 111 };
        string s = Encoding.ASCII.GetString(ba);
        Console.WriteLine(s);
    }
}

 








Related examples in the same category

1.Convert Byte array to Base64 Char ArrayConvert Byte array to Base64 Char Array
2.Encoding in actionEncoding in action
3.Encoding: Unicode ASCII GetBytes GetString
4.Encoding.BigEndianUnicode.GetString
5.Encoding.URF8/Unicode/UTF32/.GetBytes
6.Encoding.URF8/Unicode/UTF32/GetString