How can i read a CSV file into a multidimensional array?
public void CSV_ToArray(string filePath)
{
try
{
StreamReader sr = new StreamReader(filePath);
int colCount = 3;
int rowCount = getNumberOfRows(sr);
string[,] Contacts = new string[rowCount, colCount];
}
catch (Exception error)
{
MessageBox.Show(error.ToString());
}
}
I've already created the array with it's dimensions but unsure as to how to assign the data to each position in the array
The format of the CSV file will be firstName, LastName, Email