try { byte[] fileBytes = File.ReadAllBytes(textBox1.Text); StringBuilder sb = new StringBuilder(); foreach (byte b in fileBytes) { sb.Append(Convert.ToString(b, 2).PadLeft(8, '0')); } File.WriteAllText("outputFilename", sb.ToString()); } catch (OutOfMemoryException ) { }
System.IO.File.Copy()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)