I have an array A and B:
Method:
public static int[] RetornaDiferenca(int[] a, int[] b)
{...
}
Calling the method:
RetornaDiferença(new int[] {1, 2, 2}, new int[] {2})
The result would have to be: new int[] {1}
because all items of 'b' should be removed from 'a'
How to do this without linq?
[Edited] Another detail:
RetornaDiferença(new int[] {1, 2, 2}, new int[] {1})
The return has to be:
int[] {2,2}