String 用于类的vb.net Linq Agg函数

String 用于类的vb.net Linq Agg函数,string,vb.net,linq,aggregate,rows,String,Vb.net,Linq,Aggregate,Rows,我有一个基本结构,在以下列表中: Private Structure strcManagement Dim Region as string Dim Boss as string Dim Employee as string end Structure Dim l as new list(of strcManagement) 示例数据如下所示: l.add(new structure with {.Region = "Boston",.Boss="Joe Blow",Employee="Da

我有一个基本结构,在以下列表中:

Private Structure strcManagement
Dim Region as string
Dim Boss as string
Dim Employee as string
end Structure

Dim l as new list(of strcManagement)
示例数据如下所示:

l.add(new structure with {.Region = "Boston",.Boss="Joe Blow",Employee="Dan"})
l.add(new structure with {.Region = "Boston",.Boss="Joe Blow",Employee="Steve"})
l.add(new structure with {.Region = "Boston",.Boss="Joe Blow",Employee="Peter"})
l.add(new structure with {.Region = "CT",.Boss="Sam B",Employee="Brian"})
我想使用linq将数据聚合在一起,其中Region和Boss被分组,并且派生字符串是在employee上生成的:

波士顿,乔·布鲁,[丹,史蒂夫,彼得] CT,Sam B,[布莱恩]


我看到过一些示例,其中包含(字符串的)列表,但没有一个示例包含多个分组值。任何帮助都将不胜感激。

使用LINQ查询理解

Dim ans = From m In l
          Group m By m.Region, m.Boss Into Group
          Select Region, Boss, Employees = String.Join(",", (From e In Group Select e.Employee))

你能告诉我你试过什么和什么不起作用吗?请检查一下