FileStream fs1 = new FileStream(@"E:\ring\doc\目标.xls", FileMode.Open, FileAccess.Read, FileShare.Read);
FileStream fs2 = new FileStream(@"E:\ring\doc\目标22.xls", FileMode.Create, FileAccess.Write, FileShare.None);
        byte []farr = new byte[1024];
        const int rbuffer=1024;
        //fs1.ReadByte(); //读取单个字节,返回-1表示读完
        while (fs1.Read(farr, 0, rbuffer)!=0) //返回0表示读完
        {
            fs2.Write(farr, 0, rbuffer);
        }
        fs1.Close();
        fs2.Close();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2021-08-19
  • 2022-02-04
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案