string  zipfile = "c:\\a.zip";
                            //方法1
                            FileStream fs = new FileStream(zipfile, FileMode.Open);
                            //把文件读取到字节数组
                            byte[] zipdata = new byte[fs.Length];
                            fs.Read(zipdata, 0, zipdata.Length);
                            fs.Close();

//方法2 //把文件读取到字节数组 byte[] zipdata = File.ReadAllBytes(zipfile);

 

相关文章:

  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-12-26
  • 2021-06-24
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案