如何将此LINQ查询表达式从C#转换为VB.NET?

时间:2009-03-10 18:29:51

标签: c# vb.net linq c#-to-vb.net

我有以下C#LINQ查询表达式:

var duplicatedSSN =
         from p in persons
         group p by p.SSN into g
         where g.Count() > 1
         select g.Key;

任何人都可以帮我转换为VB.NET吗?

1 个答案:

答案 0 :(得分:3)

试试这个

Dim duplicateSSN = From p in persons _
                   Group By Key=p.SSN _
                   Into g = Group _
                   Where g.Count() > 1 _
                   Select Key