Почему я получаю ожидаемую ошибку идентификатора?
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click gradeList.Items.Add(textgrade.Text) textgrade.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim total As Double Dim avg As Double Dim grade As Double Dim gradecount As Integer For gradecount = 0 To gradeList.Items.Count - 1 grade = gradeList.Items.(gradecount) ' <-- ERROR here! -------- total += grade Next avg = total / gradeList.Items.Count Label3.Text = "Media totală este " & total & vbCrLf & "Scorul total este " & avg End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Label3.Text = String.Empty End Sub End Class
Что я уже пробовал:
Я не знаю, что делать.
grade = gradeList.Items.(gradecount)
Richard Deeming
Почему вы назвали этот вопрос "C#", если он не имеет никакого отношения к C#?