Without the actual code to work from, we can't be that precise.
But the error is pretty clear: You are accessing a collection of some form (list, array or other) using an index which is either negative, or larger than the index of the last value in the collection.
For example, if you have a list or an array that you are accessing in a loop, the loop counter must be less than the items count:
for (int i = 0; i < myCollection.Length; i++)
{
Console.WriteLine(myCollection[i]);
}
Will be fine, but
for (int i = 1; i <= myCollection.Length; i++)
{
Console.WriteLine(myCollection[i]);
}
Won't.