Reputation: 203
I have two string arrays (let call them “AllEmployees”, and “ActiveEmployees”) that I’d like to compare with LINQ to find all inactive employees (basically all those in AllEmployees that aren’t in ActiveEmployees.
How can I do that using LinQ?
Thanks!
Upvotes: 1
Views: 669
Reputation: 25734
How about?:
var inactiveEmployees = AllEmployees.Except(ActiveEmployees);
Upvotes: 10