List Intersect and Concat

Eraserhead

New Member
I wrote some expression to Intersect and Concat two lists TestListA & TestListB as below:\[code\]var c= TestListA.Intersect(TestListB).Concat(ListA.Where(a => ListB.Any(b => b.EndsWith("999") && b.StartsWith(a.Substring(0, a.Length - 3)))));\[/code\]I want to know how loop and other conditions looks like behind the scene and if I will write all this with the help of foreach then performance will degrade?
 
Back
Top