IEnumerable<String> existedThings =
from mdinfo in mdInfoTotal select mdinfo.ItemNo;
IEnumerable<String> thingsToSave =
from item in lbXReadSuccess.Items.Cast<ListItem>() select item.Value;
Here are two IEnumerable
.
I want to check whether a value in existedThings
exist in thingsToSave
.
O.K. I can do that with 3 line code.
bool hasItemNo;
foreach(string itemNo in existedThings)
hasItemNo= thingsToSave.Contains(itemNo);
But, It looks dirty.
I just want to know if there is better solution.