I have 2 lists that are used to store int values in C#, and I want to merge these list, but I don’t want duplicates in there. I.e. if list 1 has 1,2,4 and list 2 has, 2,3,5 I’d want 1,2,3,4,5 (don’t matter about order) in my list. I’ve tried the Concat method, but that creates duplicates.
Share
The LINQ Union method should help: