程序代码: |
Dim s As String = "0,1,2,"
Dim res As String() = s.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
Dim res1 As String() = s.Split(New Char() {","})
For Each str As String In res
MsgBox(str)
Next
MsgBox(res.Length)
For Each str As String In res1
MsgBox(str)
Next
MsgBox(res1.Length)