collection = collection.Select(item => {item.PropertyToSet = value; return item;}).ToList();
or
users.ToList().ForEach(u =>
{
u.property1 = value1;
u.property2 = value2;
});
or
users.ToList().ForEach(u =>
{
u.property1 = value1;
u.property2 = value2;
});
No comments:
Post a Comment