I am trying to read in a binary file created by a legacy VBA application.
One of the sections of the file is a date, which was written out as a four byte segment equivalent a VBA long with value 40451.
In the binary array this is represented as: 33, 67, 101, 135
If I convert the binary array back into a long in VBA I get the number 40451 again.
However, if I create a four byte array in C# and try and convert that to an Int32 using BitConverter I get the value -2023406815.
I have tried reversing the byte order but not getting anything close to 40451.
Anyone got any ideas on how to get the same value as the original VBA long?
View Complete Post