I get this issue but i dont understand it completly. Found some suggestions online but seems they depend on the source code. This is my code and i get the error where the arrow is
int j;
float aa=0, modanum, count=0, temp;
float[] mod =null;
float[] fin = null;
int[] arr = q.OfType<int>().ToArray();
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
-----> if(arr[i]==arr[j])
count+=1;
}
the array arr is delacred correctly and there are no resizes throught the process, this suggests that my arr is just not big enought, but for example i am sending a list q of 7 items and it still gets me when j=3.