This is my code where I am getting error “Index was outside the bounds of the array.”
var objectData = new object[colRindas.Count, 4];
int i = 0;
foreach (DeArtIzm izm in colRindas)
{
objectData[i, 1] = izm.ArtCode;
objectData[i, 2] = izm.ArtName;
objectData[i, 3] = izm.Price;
objectData[i, 4] = izm.RefPrice;
i++;//Place where I get that error
}
What seems to be the problem hare, cause I can’t find the problem.
Arrays are 0-indexed instead of one.