Tip Of The Day
What you Learned Today?
Wednesday, May 11, 2011
Concat vs Union in C#
List
list1 = new List
(){1,2,3};
List
list2 = new List
(){1,2,4};
var dummyConcat = list1.Concat(list2); // combine all values without distinct
var dummyUnion = list1.Union(list2);// combine all values with distinct
result for
dummyConcat
result for
dummyUnion
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment