How do I use the "NOT IN" to get the missing data, to be added to "foo" List.
var accessories = new List<string>();
var foo = new List<string>();
accessories.Add("Engine");
accessories.Add("Tranny");
accessories.Add("Drivetrain");
accessories.Add("Power Window");
foo.Add("Engine");
foo.Add("Tranny");
foo.Add("Power Window");
foreach(var v in foo.Where(x => x??).???)
{
foo.Add(v); //Add the missing "Drivetrain" to it...
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…