Not Equal two Generic Lists
Posted
by
David Johnson
on Stack Overflow
See other posts from Stack Overflow
or by David Johnson
Published on 2012-09-13T15:17:52Z
Indexed on
2012/09/13
15:38 UTC
Read the original article
Hit count: 184
I have two generic lists, both containing different data, except 4 fields, which I want to compare to another list and find items that do not match in either list.
I need to basically replace where it says equals below, with not equals!
var unMatchedData = from liveLines in liveList
join oldList in comapreSnapshotList
on new {liveLines.ClientNo, liveLines.SequenceNo, liveLines.LineNo, liveLines.Text} equals
new {oldList.ClientNo, oldList.SequenceNo, oldList.LineNo, oldList.Text}
select new KNOWTXTS
{
ClientNo = liveLines.ClientNo,
SequenceNo = liveLines.SequenceNo,
LineNo = liveLines.LineNo,
Text = liveLines.Text
};
© Stack Overflow or respective owner