Using Linq to group a list of objects into a new grouped list of list of objects
- by Simon G
Hi,
I don't know if this is possible in Linq but here goes...
I have an object:
public class User
{
public int UserID { get; set; }
public string UserName { get; set; }
public int GroupID { get; set; }
}
I return a list that may look like the following:
List<User> userList = new List<User>();
userList.Add( new User { UserID…