Create a File from a Byte Array

Need to write a byte array to a file? .NET’s got your back with File.WriteAllBytes.

Usage:

var bytes = GetSomeBytes();
File.WriteAllBytes(@"c:\temp\somefile.tmp", bytes);
Unknown's avatar

Author: Adam Prescott

I'm enthusiastic and passionate about creating intuitive, great-looking software. I strive to find the simplest solutions to complex problems, and I embrace agile principles and test-driven development.

Leave a comment