Dim Multi As String = "A8,A6,A7,A5"
Dim Values() As String
Values = Multi.split(",")
Dim ls As String = ""
Dim j As Integer
For i As Integer = 0 To Values.Length - 1
For j = 1 To Values.Length - 1
If Values(i) > Values(j) Then
ls = Values(i)
Values(i) = Values(j)
Values(j) = Ls
End If
Next
Next
Dim zf As String = ""
For Index As Integer = 0 To Values.Length - 1
If Values(index).Trim <> "" Then
If zf = "" Then
zf = Values(index)
Else
zf = zf & "," & Values(index)
End If
End If
Next
MessageBox.Show(zf)
Dim Multi As String = "A8,A6,A7,A5"
Dim lst As New List(Of String)
lst.AddRange(Multi.Split(","))
lst.Sort
Dim zf As String = String.Join(",", lst.ToArray)
MessageBox.Show(zf)
Dim Multi As String = ""
Dim lst As New List(Of String)
lst.AddRange(Multi.Split(","))
MessageBox.Show(lst.Count)
没有元素的情况下lst.count=1,是什么情况呢?
Dim Multi As String = "A8,A6,A7,A5"
Dim lst As New List(Of String)
lst.AddRange(Multi.Split(","))
lst.Sort()
lst.Reverse()
Dim zf As String = String.Join(",", lst.ToArray)
MessageBox.Show(zf)
Output.Show(String.Join(",", "A8,A6,A7,A5".Split(",").OrderByDescending(Function(元素) 元素)))