Here is my code I have tried
int[] WeeklyTotal = new int[53];
for (int w = 1; w <= 53; w++)
{
WeeklyTotal[w] = WeeklyTotal[w] + data.Rows[i]["week" + w]; // Error is here
}
But I'm getting a compile error:
Can not apply opperator + to opperands of type int and object
What is the correct syntax here?
Thanks!
for (int w = 1; w <= 53; w++)tofor (int w = 0; w < 53; w++)DataRowExtension.Field:int weekValue = data.Rows[i].Field<int>("week" + w)