Sub TestMain() Dim empList As New List(Of Employee)() empList.Add(New Employee() With {.ID = 1, .FName = "John", .Age = 23, .Sex = "M"c}) empList.Add(New Employee() With {.ID = 2, .FName = "Mary", .Age = 25, .Sex = "F"c}) empList.Add(New Employee() With {.ID = 3, .FName = "Amber", .Age = 23, .Sex = "M"c}) empList.Add(New Employee() With {.ID = 4, .FName = "Kathy", .Age = 25, .Sex = "F"c}) empList.Add(New Employee() With {.ID = 5, .FName = "Lena", .Age = 27, .Sex = "F"c}) empList.Add(New Employee() With {.ID = 6, .FName = "Bill", .Age = 28, .Sex = "M"c}) empList.Add(New Employee() With {.ID = 7, .FName = "Celina", .Age = 27, .Sex = "F"c}) empList.Add(New Employee() With {.ID = 8, .FName = "John", .Age = 28, .Sex = "M"c}) Dim query = From el In empList Group el By Key = New With {Key el.Age, Key el.Sex} Into Group Select New With {.key = Key, .count = Group.Count()} For Each Cat In query Debug.Print(Cat.ToString) Next MsgBox("coucou") End Sub Public Class Employee Private privateID As Integer Public Property ID() As Integer Get Return privateID End Get Set(ByVal value As Integer) privateID = value End Set End Property Private privateFName As String Public Property FName() As String Get Return privateFName End Get Set(ByVal value As String) privateFName = value End Set End Property Private privateAge As Integer Public Property Age() As Integer Get Return privateAge End Get Set(ByVal value As Integer) privateAge = value End Set End Property Private privateSex As Char Public Property Sex() As Char Get Return privateSex End Get Set(ByVal value As Char) privateSex = value End Set End Property End Class