I'm trying to read from file a structure with the following format:
Public Structure factor
Dim tests(,) As String
Public Structure tBase
Dim modules(,) As String
Dim weight(,) As Integer
End Structure
Dim eachT() As tBase
Dim description() As String
End Structure
It will be reading it back into a structure of that type, which is exactly what it was written with (although none of the array lengths are declared in the one it is being read back into). When I try to read it back in, I get the following error on the -second- time that it reads from it:
"Object type cannot be converted to target type."
The code I am using to read with is:
FileOpen(2, fPath, OpenMode.Binary, OpenAccess.Read)
FileGet(2, fList)
FileClose(2)
and I'm writing with:
FileOpen(2, fPath, OpenMode.Binary, OpenAccess.Write)
FilePut(2, fList)
FileClose(2)
Anyone know why this happens? Cheers
Public Structure factor
Dim tests(,) As String
Public Structure tBase
Dim modules(,) As String
Dim weight(,) As Integer
End Structure
Dim eachT() As tBase
Dim description() As String
End Structure
It will be reading it back into a structure of that type, which is exactly what it was written with (although none of the array lengths are declared in the one it is being read back into). When I try to read it back in, I get the following error on the -second- time that it reads from it:
"Object type cannot be converted to target type."
The code I am using to read with is:
FileOpen(2, fPath, OpenMode.Binary, OpenAccess.Read)
FileGet(2, fList)
FileClose(2)
and I'm writing with:
FileOpen(2, fPath, OpenMode.Binary, OpenAccess.Write)
FilePut(2, fList)
FileClose(2)
Anyone know why this happens? Cheers