1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Text;
7using System.Windows.Forms;
8using System.IO; //System.IO is not used by default
9
10public List<string[]> parseCSV(string path)
11{
12 List<string[]> parsedData = new List<string[]>();
13
14 try
15 {
16 using (StreamReader readFile = new StreamReader(path))
17 {
18 string line;
19 string[] row;
20
21 while ((line = readFile.ReadLine()) != null)
22 {
23 row = line.Split(',');
24 parsedData.Add(row);
25 }
26 }
27 }
28 catch (Exception e)
29 {
30 MessageBox.Show(e.Message);
31 }
32
33 return parsedData;
34}