using (FileStream fs = new FileStream(@"D:\3\1.xml", FileMode.Open)) { using (FileStream writer = new FileStream(@"D:\3\3.xml", FileMode.Create)) { byte[] bytes = new byte[1024 * 1024]; int count; while ((count = fs.Read(bytes, 0, bytes.Length)) > 0) { for (int i = 0; i < bytes.Length; i++) { bytes[i] = (byte)(byte.MaxValue - (int)bytes[i]); } writer.Write(bytes, 0, count); } } }
filestream 用法
最新推荐文章于 2024-05-16 19:23:03 发布