Ok Arrays are confusing me. The code below works perfectly UNTIL the file gets long. That is the part that I dont understand..why would it work with only 10 or so lines of text in the file, but not if 200 lines.
File format example is
Name Abbreviation
Name2 Abbreviation2
My array Dim Countries(250) as Country should be plenty long enough. What am I missing in this section of code..or how could I improve it. Ive read a number of examples to get me to this point.
Dim Names as string
Dim abbreviations as string
Dim List() = IO.File.ReadAllLines("Country.txt")Dim x = List.Count - 1
ReDim Countries(x)
Dim Line As String
Dim Data() As String
For i As Integer = 0 To x
Line = List(i)
Data = Line.Split(" "c)
Countries(i).Abbreviation = Data(0)
Countries(i).Names = Data(1)
Next