Imports System.Collections.Generic
Imports System.Linq
Namespace ConsoleApplication2
Class Program
Private Shared Sub Main(args As String())
Dim lstNumbers As New List(Of Double)() From { _
1, _
2.06, _
34, _
-4, _
5.9, _
61.9, _
7.8, _
8, _
9, _
18.0, _
23.7 _
}
Dim minNum As Double = lstNumbers.Min()
'lowest number
Dim maxNum As Double = lstNumbers.Max()
'highest number
Console.WriteLine("Min = {0} , Max = {1}", minNum, maxNum)
Console.ReadKey(True)
End Sub
End Class
End Namespace
/*
Min = -4 , Max = 61.9
*/