' // Процедура сортировки алгоритмом выборки
Sub SelectionSort(ByRef array() As Integer, ByVal ToUpper As Boolean)
Dim Dump As Integer
Dim Index As Integer
Dim Work As Integer
Do
For i As Integer = Work To UBound(Array)
If ToUpper = True Then
If (Array(Index) > Array(i)) Then Index = i
Else
If (Array(Index) < Array(i)) Then Index = i
End If
Next
Dump = Array(Index)
Array(Index) = Array(Work)
Array(Work) = Dump
' // c2fbefeeebede8eb3a20caf3eff0e8ffedeee220c42ec52e2028632920442d6d6f6e3535
Work += 1
Index = Work
Loop Until (Work > UBound(Array))
End Sub