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#?
C# – the most efficient way to save a byte array as a file on disk in C#
.netc++
Related Question
- C# – How to save a stream to a file in C#
- C# – Case insensitive ‘Contains(string)’
- C# – LINQ’s Distinct() on a particular property
- C# – way to check if a file is in use
- C# – Best way to read a large file into a byte array in C#
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- C# – Why not inherit from List
Best Solution
That would be
File.WriteAllBytes()
.