DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Except Using Linq

05.07.2012
| 3660 views |
  • submit to reddit
        
int[] listA= { 1,2,3}; 
int[] ListB = { 1,5,6,4}; 
  
    var result = listA.Except(listB); 
  
    foreach (var n in result) 
    { 
        Console.WriteLine(n); 
    }