using System;
using System.Linq;
public class Program
{
public static void Main()
int[] a = new int[]{ 1, 3, 5, 7, 9 };
int[] b = new int[]{ 1, 5, 9, 11 };
// Get the items in a that are not in b
var result = a.Intersect(b); // yields { 1, 5, 9 }
Console.WriteLine(String.Join(",",result.ToArray()));
}