包含
io
text
代码如下:输出8位16进制数到txt文档
UInt32[] data= new UInt32[256];
for (UInt32 i = 0; i < 256; i++)
{
data[i] = i;
}
FileStream file = new FileStream("e:\zhang.txt", FileMode.Create);
StreamWriter write = new StreamWriter(file);
for (UInt32 i = 0; i < 256; i++)
{
write.Write("0x" + data[i].ToString("X8") + " ");
}
write.Close();
file.Close();