I found this question in an old question in your website so i thought i can do it but I think I was mistaken :-)
the old post was here
I'm new at the jagged array thing so did the following code
StreamReader rows = new StreamReader("c:\\practice.txt");
string line;
int i;
i=1;
while ((line = rows.ReadLine()) != null)
{
String[][]rows = new String [i][]; ;
rows = rows.ReadLine();
String[][] rows = new string[S.Length][];
i++;
}
for (int i; i < S.Length; i++)
{
row[i] = S[I].Split(',');
}
int totalCounter = 0, totalSum = 0;
// etc
foreach(string[] row in rows)
{
int m1 = int.Parse(row[3]);
totalCounter++;
totalSum += m1;
switch(row[2])
{
case "male":
maleCount++;
maleSum += m1;
break;
case "female":
femaleCount++;
femaleSum += m1;
break;
}
}
I know i did major mistakes but at east i tried can any one help me to make it a workin code