How can yoy tell when you have reached the end of a binary file? There does not seem to be an End Of File function for this.
Printable View
How can yoy tell when you have reached the end of a binary file? There does not seem to be an End Of File function for this.
Can you post the code you're using.
Are you aware that you can do this :
which reads the whole file into the byte array for you.Code:string filename = "c:\\binaryfile.dat";
byte [] fileData = System.IO.File.ReadAllBytes(filename);
Darwen.
Thanks for your response. This is exactly what I was looking for.