im trying to add items to jagged array's, the data is being pulled from a datarowview, i have the following code
foreach (DataRowView answer in AnswersInQuestion)
{
answersJArray[index] = new string[noOfAnswersInQuestion];
answersJArray[index][j] = answer["ChoiceText"].ToString();
j++;
}
the first item gets added in fine, but when the 2nd item is put in the first item is set to null again. so for example the first time round this is what the array will look like
arr[0][0] = answer 1
arr[0][1] = null
arr[0][2] = null
arr[0][3] = null
and the 2nd time round the array will look like
arr[0][0] = null
arr[0][1] = answer 2
arr[0][2] = null
arr[0][3] = null
can any one help me on this !!
thanks