Mega Code Archive

 
Categories / VB.Net / Data Structure
 

List Linq operator

Imports System Imports System.Linq Imports System.Collections.Generic Imports System.Collections Imports System.Collections.Specialized Public Class MainClass       Public Shared Sub Main()         Dim numbers As List(Of Integer) = New List(Of Integer)(New Integer() {1, 2, 3, 4, 5, 6, 7, 8, 9})         Dim evenNums As List(Of Integer) = numbers.Where(Function(n) n Mod 2 = 0).ToList()    End Sub  End Class