-
Binary Reader
Hi,
I am reading information from a random-access-binary file.
Each record has alot of booleans to read, yet i am unable to accrately measure the length of each record if i write booleans, thus its giving me a hard time reading them.
I have a few inefficient solutions right now...
1) write booleans as 0/1 bytes, and read them
2) put booleans as 0s and 1s in singles/doubles
yet i am feeling guilty about using these turnarounds... could someone please instruct me on how to read/write bits to a binary file?
thank you
-
Some quick suggestions
Read up on Bitarrays and FileStream Objects. The first will help you encode / decode your data and the second will let you read / write it to disc.
I personally think the whole disc IO thing is appalling in .net.
One knew where one was with VB6!