Using two observal collction i want to remove items from matching same id with two collection...
Collections:
1. windows
2. windows size
My Code:
foreach (var heat in Settings.RoomViewModelCollection)
{
foreach (var room in heat.HeatTransmission)
{
if (room.Windows.Any(x => WindowSize.Any(y => y.WindowSizeId.Equals(x.WindowSizeId))))
{
heat.HeatTransmission.Remove(room);
break;
}
}
}
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Madan ShekarRank #428 · 5.9K reputationPosted Mar 20, 2019, 9:53 PM EDT
Shanthosh Siva106 reputationPosted Mar 20, 2019, 9:43 PM EDT
Shanthosh Siva106 reputationPosted Mar 20, 2019, 10:30 PM EDT
i was tried same as your code but not going inside on foeachloop it was come ouside of loop and cannot catch the deleted items indide a loop.
list :
public List