I am given this .txt file.
Left Behind,Lahaye,F,7,11.25
A Tale of Two Cities,Dickens,F,100,8.24
Hang a Thousand Trees with Ribbons,Rinaldi,F,30,16.79
That file is: Book Title, Author ,Fiction or Nonfiction, Stock ,Price
I need to split those into multiple arrays, at least I feel like I do, I have this so far
Private Sub frmInventory_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Populate array
Dim temp() As String = IO.File.ReadAllLines("Books.txt")
temp = Split(",")
lstBooks.DataSource = temp.ToList
End Sub
which isn't doing the trick... obviously.
I just don't know how to make it put it into multiple arrays, such as book, etc. or maybe a 2 dimensional array.
Thanks for any help.
I have looked on many sites like this, but the only help they offer is splitting it in 2. http://patorjk.com/programming/tutorials/vbarrays.htm#splitfunction