开发者

LINQ to Objects - NOT IN query

I have two string arrays (let call them “AllEmployees”, and “ActiveEmployees”) that I’d like to compare with LINQ to find all inactive employees (b开发者_StackOverflowasically all those in AllEmployees that aren’t in ActiveEmployees.

How can I do that using LinQ?

Thanks!


How about?:

var inactiveEmployees = AllEmployees.Except(ActiveEmployees);

System.Linq.Enumerable.Except

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜