Read File into Byte Array
It’s easy to read a file into a byte array. Just use the File.ReadAllBytes static method. This opens a binary file in read-only mode, reads the contents of the file into a byte array, and then closes the file. string filePath = @"C:test.doc"; byte[] byteArray = File.ReadAllBytes( filePath ); Related posts:C# Read Text File Line-by-LineConvert String Related posts: C# Read Text File Line-by-Line Convert String to Byte Array C# Read Text File into String














