I have a binary file written by VB6 application and now would like to use C# application to read the VB6 exported binary file. I have used the Microsoft.VisualBasic.dll into my C# project.
However there are some data inconsistency in C# application but I have check it in VB.net and it works nicely as well. (I convert from VB6 to VB.net, then VB.net to C#)
The screenshot represents the result from reading binary file by using C# and VB.Net application. VB.Net is my expected result and now my C# application was showing inconsistency result
Both are double values in C# and VB.NET, and based on my observation, the int, string values looks fine.
In C# I was using statement shown as below, BinaryDetails is struct and inside have few double variables
ValueType DetailsValueType = (ValueType)BinaryDetails;
FileSystem.FileOpen(FileNumber, FileName, OpenMode.Binary, OpenAccess.Read);
FileSystem.FileGet(FileNumber, ref DetailsValueType);
I have change the data type in C# from double to float, still not my expected result: