One of my team members sent in the following piece of code, which is clearly
intended to update the OrderNumber
field for all objects in a
List
list = cardQueue.FindAll(delegate(MyObject obj1)
{
if (obj1.ProductId == processedProductId)
{
obj1.OrderNumber = orderNumber;
}
return true;
});
It had never occurred to me that you can modify an object inside of a Predicate
Posted with : Tech, General Programming, Microsoft .NET Framework