Intersect() method in C# is an extension method.It applies the set theory of mathematics.In set theory the Intersect method returns the common elements of two sets. Similarly the Intersect method returns the common elements in two collections.It is defined in the namespace System.Linq For example if we define two lists as:

1 2 | IList<int> intList1 = new List<int>() { 100, 200, 300, 400 }; IList<int> intList2 = new List<int>() { 100, 500, 600 }; |

then we can […]