I have the following code:
List test1 = new List { \"@bob.com\", \"@tom.com\" };
List test2 = new List
Try the following:
List test1 = new List { "@bob.com", "@tom.com" };
List test2 = new List { "joe@bob.com", "test@sam.com" };
var output = from goodEmails in test2
where !(from email in test2
from domain in test1
where email.EndsWith(domain)
select email).Contains(goodEmails)
select goodEmails;
This works with the test set provided (and looks correct).