Preview:
public static class PHVExtensions
{
    public static IEnumerable<T> SetValue<T>(this IEnumerable<T> items, Action<T>
         updateMethod)
    {
        foreach (T item in items)
        {
            updateMethod(item);
        }
        return items;
    }
}

/*
With that method in place, I can write my statement like this:
customers.Where(c => c.IsValid).SetValue(c => c.CreditLimit = 1000).ToList();

Or like this:
var newCustomers = customers.Where(c => c.IsValid).SetValue(c => c.CreditLimit = 1000);

Or like this for Entity Framework:
db.Customers.Where(c => c.IsValid).ToList().SetValue(c => c.CreditLimit = 1000);
*/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter