LINQ - OrderBy

VbNet · Console

/Program.vb

Option Strict On
Imports System
Imports System.Linq
Public Module Module1
	Public Sub Main()
		'Create a collection of values
		Dim values() As Integer = {5, 32, 19, 4, 0}

		'Print the sorted collection
		For Each value As Integer In (From i As Integer In values Order By i)
			Console.WriteLine(value)
		Next
	End Sub
End Module
;