我是学生,请多多包涵……以下是我的代码:
Private Sub cboYear_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cboYear.SelectedIndexChanged
'declare variables
Dim intSelectedYear As Integer
Dim intNumhUUR As Integer
'select year from combobox
intSelectedYear = cboYear.SelectedIndex
' get number of hurricanes for selected year from number
' of hurricanes array
intNumhUUR = _intNumberOfHurricanes(intSelectedYear)
'and display in label
lblNumberOfHurricanes.Visible = True
lblNumberOfHurricanes.Text = "The number of Hurricanes " &
"in the year " & intSelectedYear.ToString & " is " &
intNumhUUR.ToString()
End Sub