How to return the difference of a matrix in C # without using LINQ? [closed]

1

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} 
    
asked by anonymous 24.10.2017 / 12:09

0 answers