且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将字节数组保存到文件

更新时间:2023-11-09 13:01:40

You can use:

File.WriteAllBytes("Foo.txt", arrBytes); // Requires System.IO

If you have an enumerable and not an array, you can use:

File.WriteAllBytes("Foo.txt", arrBytes.ToArray()); // Requires System.Linq