主题:红色部分
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
Dim friends(4) As String
friends(0) = "jonathan"
friends(1) = "TRichard"
friends(2) = "Thearon"
friends(3) = "Sharon"
friends(4) = "Micheal"
Dim morefriends(1) As String
morefriends(0) = "Zita"
morefriends(1) = "Seth"
[color=FF0000]AddFriendsToList(friends)
AddFriendsToList(morefriends)[/color] Dim friendName As String
For Each friendName In friends
lstFriends.Items.Add(friendName)
Next
End Sub
Sub AddFriendstToList(ByVal friends() As String)
Array.Sort(friends)
Dim friendname As String
For Each friendname In friends
lstFriends.Items.Add(friendname)
Next
End Sub
红色部分有错,请问错在那里
Dim friends(4) As String
friends(0) = "jonathan"
friends(1) = "TRichard"
friends(2) = "Thearon"
friends(3) = "Sharon"
friends(4) = "Micheal"
Dim morefriends(1) As String
morefriends(0) = "Zita"
morefriends(1) = "Seth"
[color=FF0000]AddFriendsToList(friends)
AddFriendsToList(morefriends)[/color] Dim friendName As String
For Each friendName In friends
lstFriends.Items.Add(friendName)
Next
End Sub
Sub AddFriendstToList(ByVal friends() As String)
Array.Sort(friends)
Dim friendname As String
For Each friendname In friends
lstFriends.Items.Add(friendname)
Next
End Sub
红色部分有错,请问错在那里