Hi all, i am attempting to write some simple data to a binary file, this works but the data is readable here is the code i am using.
I get: **24/04/2007 00:00:00
But i expected to see unreadable characters. Does any body know why this is? Any help appreciated
Age is a consequence of experience
Code:
char delimiter = '*';
FileStream fileStream = new FileStream(dateFileName, FileMode.OpenOrCreate, FileAccess.Write);
string[] contents = new string[1] {"24/04/2007 00:00:00"};
BinaryWriter binaryWriter = new BinaryWriter(fileStream);
//put data into file
binaryWriter.Write(delimiter.ToString());
binaryWriter.Write(delimiter.ToString());
binaryWriter.Write(contents[0].ToString());
binaryWriter.Close();
fileStream.Close();
But i expected to see unreadable characters. Does any body know why this is? Any help appreciated
Age is a consequence of experience