Union

suggest change

Merges two collections to create a distinct collection using the default equality comparer

int[] numbers1 = { 1, 2, 3 };
int[] numbers2 = { 2, 3, 4, 5 };

var allElement = numbers1.Union(numbers2);   // AllElement now contains 1,2,3,4,5

Live Demo on .NET Fiddle

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents