I have five values where it is possble that one or multiple values are 0. There is a minimum of two values greater than 0.
What is, using VB.net, the easiest and cleanest way to find the smallest value of these values and ignore values that are 0?
EDIT: I am this far:
'get smalles value that is not 0
Dim heights As List(Of Double)
heights.Add(sectionHeight1)
heights.Add(sectionHeight2)
heights.Add(sectionHeight3)
heights.Add(sectionHeight4)
heights.Add(sectionHeight5)
For i = 0 To 4 Step 1
If heights(i) = 0 Then
heights.RemoveAt(i)
End If
Next