Blog

Output of following code:

static void Main(string[] args) {
var a = new List { 2,3,42,5,4,1,7};
var b = new List { 2,1 ,3, 42, 8, 1 };

var c = a.Where(x => b.Any(y => x == y)).ToList();
foreach (var item in c) {
Console.Write(“{0} “, item);
}

}