Mega Code Archive

 
Categories / C# Tutorial / LINQ
 

Create the Except query

using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; public class MainClass{    public static void Main(string[] args){             String[] First = { "One", "Two", "Two", "Three", "Four" };          String[] Second = { "Three", "Four", "Five", "Six" };          var ShowExcept = First.Except(Second);          Console.WriteLine("Except:");          foreach (String ThisElement in ShowExcept)             Console.WriteLine(ThisElement);    } }