C# – the most efficient way to save a byte array as a file on disk in C#

.netc++

Pretty simple scenario. I have a web service that receives a byte array that is to be saved as a particular file type on disk. What is the most efficient way to do this in C#?

Best Solution

That would be File.WriteAllBytes().