Save file from a byte[] in C# NET 3.5

后端 未结 5 1875
长发绾君心
长发绾君心 2021-02-04 04:39

My TCP Client receives a image within a packet.The image is compressed with zlib.The task is to decompress the image and put it on the form.

I\'m planning to save the co

5条回答
  •  醉酒成梦
    2021-02-04 05:05

    Use the static void System.IO.File.WriteAllBytes(string path, byte[] bytes) method.

    byte[] buffer = new byte[200];
    File.WriteAllBytes(@"c:\data.dmp", buffer);
    

提交回复
热议问题