Imports System.Collections.Generic
Dim studentList = New List(Of Student) From {
New Student() With {.StudentID = 1, .StudentName = "John", .Age = 13, .StandardID = 1},
New Student() With {.StudentID = 2, .StudentName = "Moin", .Age = 21, .StandardID = 1},
New Student() With {.StudentID = 3, .StudentName = "Bill", .Age = 18, .StandardID = 2},
New Student() With {.StudentID = 4, .StudentName = "Ram", .Age = 20, .StandardID = 2},
New Student() With {.StudentID = 5, .StudentName = "Ron", .Age = 15}
Dim standardList = New List(Of Standard) From {
New Standard() With {.StandardID = 1, .StandardName = "Standard 1"},
New Standard() With {.StandardID = 2, .StandardName = "Standard 2"},
New Standard() With {.StandardID = 3, .StandardName = "Standard 3"}
Dim joinResult = studentList.Join(standardList,
Function(s) s.StandardID,
Function(std) std.StandardID,
Function(s, std) New With
.StudentName = s.StudentName,
.StandardName = std.StandardName
For Each stud In joinResult
Console.WriteLine("{0} - {1}", stud.StudentName, stud.StandardName)
Private _studentID As integer
Private _studentName As string
Private _standardID As integer
Property StudentID() As integer
Set(ByVal Value As integer)
Property StudentName() As string
Set(ByVal Value As string)
Property Age() As integer
Set(ByVal Value As integer)
Property StandardId() As integer
Set(ByVal Value As integer)
Private _standardID As integer
Private _standardName As string
Property StandardID() As integer
Set(ByVal Value As integer)
Property StandardName() As string
Set(ByVal Value As string)