CSharp examples for System.IO:BinaryReader
Read String with Unicode Encoding
using System.Text; using System.IO;//from www . ja va 2s.c o m using System.Globalization; using System; public class Main{ public static string ReadString(this BinaryReader br, int len, Encoding enc = null) { if (enc == null) enc = Encoding.Unicode; return enc.GetString(br.ReadBytes(len)); } }