Reading Storing CSV Data into an Array

Mar 7 2019 5:40 AM
  • I have a CSV file which has 9 columns. (Date,DrawNumber,N1,N2,N3,N4,N5,N6,B1)
  • Below the above columns are 55 rows of data.
  • The data in the rows are separated by the (,) delimiter.
1) In a console application, the user will input 6/7 numbers which will be stored.
 
2.) How do I read and save the CSV data into array(s) in such a way where I can count how many times each number (of the users inputted set of 6 or 7 numbers) were found in the entire CSV (from these columns: N1,N2,N3,N4,N5,N6,B1). Example: Number 33 = Found 12 Times, Number 14 found 11 Times,... (and so on for the remainder of the inputted numbers)
 
3.)From the 6 or 7 numbers that the user will input, I will also have to see how many numbers (of the user's input) will match with each row of the CSV. In other words, I have to match combinations per row (N1,N2,N3,N4,N5,N6,B1)
 
What would be the best way of reading and storing the data to allow for such data manipulations? (your sample code will be appreciated) ?
 
Thanks in advance.
 
EXAMPLE OF CSV DATA:
CSV Capture 

Answers (3)