using System;
using System.IO;
public class MainClass
{
public static int Main(string[] args)
{
FileStream myFStream = new FileStream("test.dat", FileMode.OpenOrCreate, FileAccess.ReadWrite);
for(int i = 0; i < 256; i++)
myFStream.WriteByte((byte)i);
myFStream.Position = 0;
for(int i = 0; i < 256; i++)
Console.Write(myFStream.ReadByte());
Console.WriteLine();
myFStream.Close();
return 0;
}
}
|