I'm trying to make a console app with two double type arrays, but i have a problem. How can i add two arrays into one, but without repeating same number (i have same number in two arrays)?
Thank you very much
Use Union
from Linq:
double[] a = new double[] { 1, 2, 3, 4 };
double[] b = new double[] { 3, 4, 5, 6 };
double[] arr = a.Union(b).ToArray();
Variable arr
will now contain 1, 2, 3, 4, 5, 6
.