c# linq update value in list code example
Example 1: linq to update a list
customers.Where(c => c.IsValid).Select(c => { c.CreditLimit = 1000; return c; }).ToList();
Example 2: linq to update a list
var newCustomers = customers.Where(c => c.IsValid).Select(c => { c.CreditLimit = 1000; return c; });