I was just wondering not just concerning this piece of code but in some other code as well how can i avoid --> if (j!=array.Length-1) and put something else maybe
something in the for loop? LINE6
for (int i = 0; i < array.Length; i++)
{
for (j=counter; j < array.Length; j++)
{
if (j!=array.Length-1)
{
if (array[i] == array[j+1] )
{
array[i] = 0;
}
}
}
if (array[i] != 0)
{
items.Add(array[i]); // storing none duplicates random number.
}
counter++;
}