Guys
Im having real problems getting my head around foreach loop
I have the following
var readLine = await FileIO.ReadLinesAsync(sampleFile);
foreach (String i in readLine)
{
string[] Split = readLine[i].Split(new Char[] { ',' });
this.textoutput.Text = Split[0];
}
readLine is a string loaded from a CSV file and has 1295 []
I need to loop through each string in the array, split it, check the first part and print it in a text box
I get two errors with the code
1. The best overloaded method match for 'System.Collections.Generic.IList<string>.this[int]' has some invalid arguments
2. Argument 1: cannot convert from 'string' to 'int'
both on the readLine[i] part of the split line
any ideas where i'm going wrong
Mark