Well this is my problem..the code below is to display the grade that is associated with the points the user enters. Now, my problem is how can I have a message display an error message when the user enters a number above 500 or my array..any help is greatly appreciated.
Dim strGrades() As String =
{"F", "D", "C", "B", "A"}
Dim intPoints() As Integer =
{0, 300, 350, 400, 450}
Dim intSearchPoints As Integer
Dim intSub As Integer
Integer.TryParse(txtPoints.Text, intSearchPoints)
Do Until intSub = intPoints.Length OrElse intSearchPoints < intPoints(intSub)
intSub = intSub + 1
Loop
If intSub <= intPoints.Length Then
lblGrade.Text = strGrades(intSub - 1).ToString
Else
lblGrade.Text = "Invalid Points"
End If