Click here to Skip to main content
11,583,555 members (66,143 online)
Click here to Skip to main content

Tagged as

Diff two lists

, 21 Dec 2010 CPOL 1.5K 1
Rate this:
Please Sign up or sign in to vote.
How about using Linq to find the common items in a list?List listOne = new List{"a", "b", "c", "d"};List listTwo = new List { "d", "e", "f", "g" };List listCommon= listOne.Intersect(listTwo).ToList();
How about using Linq to find the common items in a list?

List<String> listOne = new List<string>{"a", "b", "c", "d"};
List<String> listTwo = new List<string> { "d", "e", "f", "g" };
List<String> listCommon= listOne.Intersect(listTwo).ToList();

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

torken2
Software Developer (Senior) realdolmen
Belgium Belgium
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150603.1 | Last Updated 21 Dec 2010
Article Copyright 2010 by torken2
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid