HI WELCOME TO KANSIRIS

Update value for all list items in a list using LINQ/Lambda Expression

Leave a Comment
private class User
{
public string Name { get; set; }
public int Age { get; set; }
public int status { get; set; }
}
List userList = new List();
userList.Select(usr => { usr.status = 1; return usr;} ) .ToList();

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.