static void Main(string[] args)
{
FileStream m_fs = new FileStream(@"c:\data.dat", FileMode.Create);
BinaryWriter m_bw = new BinaryWriter(m_fs);
for (int i = 0; i < 11; i++)
m_bw.Write((int)i);
m_bw.Close();
Console.WriteLine("Write to file succeed!");
}
|