The following example will do so
Dim numberCollection = New List(Of Integer)() From { _
14, _
25, _
23, _
64, _
4, _
35, _
26, _
19, _
100 _
}
' By using the max, min function of the generic collection
'Also observe the useage of Anonymous Type in C#
Dim result = New With { _
Key .GreatestNumber = intList.Max(), _
Key .LowestNumber = intList.Min() _
}
Console.WriteLine("Max= {0} Min={1}", result.GreatestNumber, result.LowestNumber)
Output
------- Max= 100 Min=4