O
Ollie
Now I feel really silly.
I have taken a closer look at the binary file and noticed I was reading the
wrong section of bytes form the file.
It now works a treat.
Thanks for all the help. Your resonses have given me a better understanding
and I am sure it helped find my error.
Sorry guys.
Well, I don't know enough about how VB works to say for sure, but it
will probably help someone else to help you.
Could you give an example of the value VB reads (as a floating point
number), the value C# reads, and the data in the file?
I have taken a closer look at the binary file and noticed I was reading the
wrong section of bytes form the file.
It now works a treat.
Thanks for all the help. Your resonses have given me a better understanding
and I am sure it helped find my error.
Sorry guys.
Ollie said:Using VB I can open the file for Binary Access
Open [filename] For Binary Access Read Lock Read Write As #1
Populate my variables with contents of the file.
Get #1, , myType
And then covert the double to a DateTime
Format(myType.myDateDouble, "dd-mm-yyyy")
And it works fine. What is interesting is the value of the double in VB is
different to C#
Does this help a all.
Well, I don't know enough about how VB works to say for sure, but it
will probably help someone else to help you.
Could you give an example of the value VB reads (as a floating point
number), the value C# reads, and the data in the file?