Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINQ Group By problem

I am using VB.NET and DataSets; I have two tables and a relation. I'm querying the first table, but I can't use Group By on any field of the table. Here's the error I am seeing:

Definition of method 'GroupBy' is not accessible in this context

And my code is as follows:

Dim Groups = From n In dataSetTableAsEnumerable _
   Group By n.filedName  Into Group

Thanks for any assistance.

like image 813
new Avatar asked Feb 12 '26 23:02

new


1 Answers

Imports System.Linq on the top of your vb code file.

like image 79
CodingBarfield Avatar answered Feb 15 '26 15:02

CodingBarfield



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!