VB.NET - LINQ to SQL Count query results



Counts the number of results from a query.

'Assembly: System.Core.dll
'Namespace: System.Linq
'Dim queryResult AS item
'Dim item AS item
'Dim dataSource AS String
'Dim field1 AS String
'Dim field2 AS String

        Dim queryResult = From item In dataSource _
                    Select item.field1, item.field2                    
                 Dim count = queryResult.Count

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.