Dim myArray() As Integer = {a, b, c, d, f}
Dim largest As Integer = Integer.MinValue
Dim smallest As Integer = Integer.MaxValue
For Each element As Integer In myArray
largest = Math.Max(largest, element)
smallest = Math.Min(smallest, element)
'myArray(largest).Remove()
'(this part have error, as it stated that is not part of array statement)
Next
lblmax.Text = largest
lblMin.Text = smallest
Based on the code above i would like to remove the largest and smallest element from the array list and then put it into a new array list, is it possible?
if yes please help out, thanks.