You should probably not use <= in your for loops as c# uses index that starts at 0.
Consider the following.
Index: 0 1 2 3
int[] arr = { 4, 6, 7, 5 };
In the case above, the variable arr contains four elements -> count = 4, but the last index is 3.
If you try to do
int x = arr[arr.Length];
you will get an 'Index was out of range' error.
Try this:
for (int i = 0, iCounter=0; i < arrConvertingColumn.Count; i++, iCounter++)
{
for (int j = 0; j < arrConvertingColumn[i].Count; j++)
{
ccsColumns[iCounter] = (ConvertingColumn)arrConvertingColumn[i][j];
}
}
That said, you don't show the size of
ccsColumns
, so you still might have a problem with your
iCounter
variable.