奇怪,我的测试代码的输出文件是256k using (FileStream fs = File.Create("c:\\temp.bin")) { using (BinaryWriter bw = new BinaryWriter(fs)) { for (int z = 1; z <= 64; z++) for (int y = 1; y <= 64; y++) for (int x = 1; x <= 64; x++) bw.Write(((byte)0x31)); } } 写入(byte)0x00也是同样的结果是不是tt3 里面有问题
http://technet.microsoft.com/zh-cn/system.io.binarywriter.write.aspx(byte)tt3[x, y, z] 写进去必然小于等于 255tt3[x, y, z] 写进去有可能大于 255.你几种方式产生的输入都不同, 怎么能保证输出相同呢?
即使是0,如果是int类型写进去也是4bytes。但我想知道,为什么是180K呢?
不应该是64*64*64个数据么?最少不也得256K么
using (FileStream fs = File.Create("c:\\temp.bin"))
{
using (BinaryWriter bw = new BinaryWriter(fs))
{ for (int z = 1; z <= 64; z++)
for (int y = 1; y <= 64; y++)
for (int x = 1; x <= 64; x++)
bw.Write(((byte)0x31));
}
}
写入(byte)0x00也是同样的结果是不是tt3 里面有问题