Imports System.IO
Imports System.Reflection
Imports System.Linq
Imports System.Xml.Linq
Public Class MainClass
Public Shared Sub Main
Dim numbers() As Integer = {5, 4, 1, 3, 10}
Dim numberGroups = From num In numbers _
Group num By Remainder = num Mod 2 Into NumberGroup = Group _
Select Remainder, NumberGroup
For Each g In numberGroups
For Each n In g.NumberGroup
Console.WriteLine(n)
Next
Next
End Sub
End Class
|