I used this following code to achieve it and worked fine, but is there any quick or easy way to achieve the same?
Well, there is a cleaner way to achieve this, in my opinion - just don't use lambdas, etc. generally:
foreach (var item in DisplayColumns)
{
item.IsSelected = item.ColumnName != "Bug" && item.ColumnName != "Feature";
}
- false, "", ""; true . ToList ForEach, # ForEach , , .
LINQ - - ( Q), . ToList LINQ - List<T>.ForEach .NET 2.0 LINQ.