VB.net Program to Demonstrate the Linq Query

You are currently viewing VB.net Program to Demonstrate the Linq Query

VB.Net program to demonstrate the LINQ Query

'VB.NET program to demonstrate the LINQ Query.

Imports System
Imports System.IO
Imports System.Linq

Module Module1
    Sub Main()
        Dim intVals() As Integer = {10, 20, 30, 35, 40, 50, 60}

        Dim result = From val In intVals Where val >= 30

        Console.WriteLine("Result: ")
        For Each val As Integer In result
            Console.Write(val & " ")
        Next
        Console.WriteLine()

    End Sub
End Module
Result:
30 35 40 50 60
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply