can this information solve your problem
Code:
for writing
FileStream fs=new FileStream(filename,FileMode.Create);
BinaryWriter wr=new BinaryWriter(fs)
wr.write(your variable name);
for reading this data
FileStream fs=new FileStream(filename,FileMode.Open);
BinaryReader rd=new BinaryReader(fs);
in this section you must use variable type reading format
for example if you write an integer value with binarywriter use must use
rd.ReadInt32();
command
or a boolean value use must use rd.ReadBool();
command;
for reading all records and assigning them to an array you can make a loop like this
[CODE]
i=0;
while(fs.Position!=fs.Length)
{
array[i]=rd.ReadString();// rd.ReadInt32() or rd.ReadDouble()
i++;
}