I have a method to check whether two arrays are equal.
private bool CheckArray(int[] ilk_dizi, int[] son_dizi)
{
for (int i = 0; i < 5; i++)
{
if (ilk_dizi[i]==son_dizi[i])
{
if (i==4)
{
return true;
}
else
{
continue;
}
}
else
{
return false;
}
}
}
but i have a “not all code returs value” error. Any Ideas?
you have the possibility of a “no return”
Be wary when using continue, alot of times it is not really necessary.
Try optimising your code as follows