I have a text file having these inside:
test | 11 | 12 | 13 | 14 | 0
i am making a program with a data grid and im having problems splitting the rows because of the character "|". Does anyone know a solution for this ? my code below doesn't seem to work:
foreach( string data in strArray )
{
string[] textData = System.IO.File.ReadAllLines(fName);
string[] storedData = strArray[0].Split("|");
for(int i=1; i < textData.Length; i++)
{
dataGridView1.Rows.Add(textData[i].Split(','));
dataGridView1.Rows.Add();
dataGridView1.Rows[i].Cells[0].Value = data;
j++;
}
}
im getting the error "Cannot convert from 'string' to 'char[]'
Thanks for the help.