How do I check whether a List contains an element that exists in another List using LINQ in C#? I don\'t want to use a for/while loop.
So, if List1 has A, B, C and L
Try this:
List a = ... List b = ... var inComon = a.Intersect(b).Any();