I have a 2d array of boolean data that I want to save to a a file and then later read it back, when I re-start my program.
Is there a really easy way to do this? I have tried the following, but have problems when trying to read the file ...
FileOpen(1,"FileData.dat", OpenMode.Binary, OpenAccess.Write)
FilePutObject(1,ArrayData)
FileClose(1)
That seems to work okay, the file is created ...
When I want to read it ...
FileOpen(1,"FileData.dat", OpenMode.Binary, OpenAccess.Read)
FileGetObject(1,ArrayData)
FileClose(1)
When this code is executed, the FileGetObject statement causes ...
A first chance exception of type 'System.IO.EndOfStreamException' occurred in Microsoft.VisualBasic.dll
The array is defined as ...
Dim ArrayData(20, 23) as Boolean
I am not sure what I am doing wrong here... Any help?
Is there a really easy way to do this? I have tried the following, but have problems when trying to read the file ...
FileOpen(1,"FileData.dat", OpenMode.Binary, OpenAccess.Write)
FilePutObject(1,ArrayData)
FileClose(1)
That seems to work okay, the file is created ...
When I want to read it ...
FileOpen(1,"FileData.dat", OpenMode.Binary, OpenAccess.Read)
FileGetObject(1,ArrayData)
FileClose(1)
When this code is executed, the FileGetObject statement causes ...
A first chance exception of type 'System.IO.EndOfStreamException' occurred in Microsoft.VisualBasic.dll
The array is defined as ...
Dim ArrayData(20, 23) as Boolean
I am not sure what I am doing wrong here... Any help?