I have 3 lists
List<User> filterRes1 = new List<User>();
List<User> filterRes2 = new List<User>();
List<User> filterRes3 = new List<User>();
And I am trying only to get the item that is common on all three of those lists like so.
decListWithFiltersFinal = filterRes1
.Intersect(filterRes2)
.Intersect(filterRes3).ToList();
This does work, but if one list does not contain anything, the result is always nothing.
How can I skip empty lists and still get the comon item between mulitple lists?
Also how can I check if the list is null
and not just "empty".
Thank you!