Get Max and Min from Array - VB.net
Get Max and Min from Array
Dim data() As Int16 = {1, 2, 3, 5, 6, 7, 3}
Dim C As Integer = data.Max()
Dim D As Integer = data.Min()
Distinct of Array
Dim data() As Int16 = {1, 2, 3, 5, 6, 7, 3}
Dim M() As Int16 = data.Distinct().ToArray()
Sum With Array
Dim data() As Int16 = {1, 2, 3}
Dim X As Int32 = data.Sum(Function(y) y) ' This will Return 6
Comments
Post a Comment