Csharp / C# Linq Intersect example

Csharp / C# Linq Intersect example

Example:

using System; using System.Linq;

class LinqIntersectExample { static void Main(string[] args) {

int[] nums1 = { 51, 52, 63, 72, 110 }; int[] nums2 = { 53, 52, 72, 110, 51 };

// will get only common elements var results = (from n in [...]