У меня есть коллекция как таковая
Private Shared ReadOnly thermoPaths As New ReadOnlyCollection(Of String) _
({
"thermometer_000_108x320.jpg",
"thermometer_010_108x320.jpg",
"thermometer_020_108x320.jpg",
"thermometer_030_108x320.jpg",
"thermometer_040_108x320.jpg",
"thermometer_050_108x320.jpg",
"thermometer_060_108x320.jpg",
"thermometer_070_108x320.jpg",
"thermometer_080_108x320.jpg",
"thermometer_090_108x320.jpg",
"thermometer_100_108x320.jpg"
})
И я хочу связать десятичное значение от 1 до 100 с соответствующим элементом в моей коллекции.
Так что в основном я пытаюсьдостичь этого.
Select Case Decimal.Round(value)
Case 1 To 9
Dim x As String = thermoPaths(0)
Case 10 To 19
Dim x As String = thermoPaths(1)
Case 20 To 29
Dim x As String = thermoPaths(2)
Case 30 To 39
Dim x As String = thermoPaths(3)
case ''AND SO ON
End Select
Но я уверен, что должен быть "более чистый" способ сделать это?