Logo

Programming-Idioms

History of Idiom 218 > diff from v6 to v7

Edit summary for version 7 by AL:
New C# implementation by user [AL]

Version 6

2020-01-11, 07:43:03

Version 7

2020-01-14, 21:07:17

Idiom #218 List intersection

Create list c containing all unique elements that are contained in both lists a and b.
c should not contain any duplicates, even if a and b do.
The order of c doesn't matter.

Idiom #218 List intersection

Create list c containing all unique elements that are contained in both lists a and b.
c should not contain any duplicates, even if a and b do.
The order of c doesn't matter.

Extra Keywords
intersect and conjunction
Extra Keywords
intersect and conjunction
Imports
using System.Linq;
using System.Collections.Generic;
Code
c = a.Union(b).ToList();