I have two lists: orders and items and I need to compare them by their name AND then look if order list have bool set to false and if it satysfy the condition it copies its string message and then adds to new list and I just have no freaking idea even how to compare lists, so any help will be appreciated Function:
private static void FailedItemsList(List<Item> failed, List<Order> orders, List<Item> items)
{
foreach(var order in orders)
{
foreach(var item in items)
{
if(order.Equals(item))
{
if(order.Fulfilled == false)
{
item.FailMessage = order.FailMessage;
failed.Add(item);
}
}
}
}
}