How to change value of an object using linq

I have the following statment that if isdefault is true to this collection i need to set each object isDefault property to false.

  custHead.lstCustomziation.Where(x => x.IsDefaultSelected == true).Select(x=>{x.IsDefaultSelected=false});

lstCustomziation  is a collection.
Jon Skeet
people
quotationmark

LINQ is for querying. You should use a foreach loop to make changes:

foreach (var item in custHead.lstCustomziation.Where(x => x.IsDefaultSelected))
{
    item.IsDefaultSelected = false;
}

That said, if IsDefaultSelected is false for the other items anyway, it may be simpler just to unconditionally set it:

foreach (var item in custHead.lstCustomziation)
{
    item.IsDefaultSelected = false;
}

people

See more on this question at Stackoverflow