Mega Code Archive

 
Categories / VB.Net / LINQ
 

Sum with Linq

Imports System Imports System.Collections.Generic Imports System.Data Imports System.Linq Imports System.Text Imports System.Globalization Module Example    Public Sub Main()       Dim TestArray As Integer() = New Integer() {1, 2, 3, 4}       Dim ThisQuery = Aggregate TheResult In TestArray Into Sum(TheResult)       Console.WriteLine("Sum: " + ThisQuery.ToString())    End Sub  End Module