using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace ConsoleApplication1
{
public cla
You can use this way :
(from car in mylist
where car.id == 1
select car).Update(
car => car.id = 3);
My reference is this website. Or following is the code for Update method
public static void Update(this IEnumerable source, params Action[] updates)
{
if (source == null)
throw new ArgumentNullException("source");
if (updates == null)
throw new ArgumentNullException("updates");
foreach (T item in source)
{
foreach (Action update in updates)
{
update(item);
}
}
}