How do I use “Into” LINQ expression in VB.NET?

后端 未结 1 696
被撕碎了的回忆
被撕碎了的回忆 2021-01-05 07:57

I\'m converting from C# this LINQ expression. However, it does not seem to work.

C#

 return (from w in fishSticks
         group w by w.FishQty into          


        
相关标签:
1条回答
  • 2021-01-05 08:02

    VB.Net has different group syntax

    The correct syntax is

    Dim q = (From w In fishSticks
             Group By Quantity = w.FishQty Into g = Group
             Order By Quantity Descending
             Select g).First().First()
    
    0 讨论(0)
提交回复
热议问题