Merge Two Arrays – The LINQ Way

I just came across a requirement of  merging two arrays of integers. So I already had this integer array and there was a new array of same type and required merging those two. Yep remove any duplicates as well.

Line 4 of the Code

It just says add idList2 to idList1 and remove of any duplicates and convert the output to an array. In this case to an Integer array.

Output Window

Output Window

Happy Coding !!! 🙂