Hi_Amos
坚持每天都在进步!!

 

                  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);

 

posted on 2014-09-09 15:22  Hi_Amos  阅读(8085)  评论(0编辑  收藏  举报