I have two columns in a CSV file and I need to store each column in a separate array.
Name,AvalibilityAsBoolean
---------------------------
Vagarth Gaurav,True
Dhananjay Menon,False
I would like to have one array for name, and another array for availability as a boolean value stored similar to below.
Name(0) = "Vagarth Gaurav"
Name(1) = "Dhananjay Menon"
Available(0) = True
Available(1) = False
The only problem is reading the CSV and storing the strings and booleans into the proper arrays.
Please help, I am new to VB. I am using Visual Basic 2010
I’m sure this question has been asked before, but this should help. Utilizing the TextFieldParser Class to do the parsing for you makes it easy. Code for managing the two arrays is displayed in this code example too.