我遇到这个错误,我的索引超出了数组的范围 有人可以帮我看一下我的代码吗?
Private Sub picList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picList.Click
frmList.Show()
frmList.lstShow.Items.Clear()
Dim fmtStr As String = "{0,-5}{1,-10}{2,-15}{3,-20}{4,-25}"
With frmList.lstShow.Items
.Add(String.Format(fmtStr, "University Name", "Abbreviation", "State", "Accredited Year", "Total Students"))
For A = 0 To N - 1
.Add(String.Format(fmtStr, Name(A), Abbreviation(A), State(A), Accredited(A), Total(A)))
Next
.Add(String.Format(fmtStr, "", "", "", "", ""))
.Add("Total of " & N & " Universities.")
End With
End Sub