Here is the structure that I have:
Friend Class StandardFormatFile
Friend fileType As String
Friend numberOfSeries As Integer
Friend standardSeriesData As New ArrayList
End Class
Friend Class StandardFormatFileSeries
Friend standardNumOfElements As Integer
Friend standardSeriesName As String
Friend standardDataElements As New ArrayList
End Class
Friend Class StandardFormatFileElement
Friend standardX_TimeValue As Single
Friend standardY_SampleValue As Single
End Class
Now, here is the code implementing it:
ReDim Preserve firstFile.standardSeriesData(firstFile.numberOfSeries - 1)
For i As Integer = 0 To firstFile.numberOfSeries - 1
Try
firstFile.standardSeriesData(i).standardSeriesName = GetSeriesName(file1BReader)
secondFile.standardSeriesData(i).standardNumOfElements = GetSeriesName(file2BReader)
ReDim Preserve firstFile.standardSeriesData(i).standardDataElements(firstFile.standardSeriesData(i).standardNumOfElements)
For j As Integer = 0 To firstFile.standardSeriesData(i).standardNumOfElements - 1
firstFile.standardSeriesData(i).standardDataElements(j).standardX_TimeValue = file1BReader.ReadSingle
firstFile.standardSeriesData(i).standardDataElements(j).standardY_SampleValue = file1BReader.ReadSingle
secondFile.standardSeriesData(i).standardDataElements(j).standardX_TimeValue = file2BReader.ReadSingle
secondFile.standardSeriesData(i).standardDataElements(j).standardY_SampleValue = file2BReader.ReadSingle
Next
Catch ex As Exception
MsgBox(ex.Message & " *** i = " & i)
End Try
Next
I dont know why I am getting the error I am getting the error. I am ReDim'ing...shouldnt that work? Ive tried Arraylists and List(of object) and that doesnt work correctly.
help... stuck!