Arrays (VB)

VBNOVICE

Newcomer
Joined
Apr 28, 2003
Messages
1
Arrays

this is my first post I'm hoping I can get some assistance with how to search a one-dimensional array of a structure that contains 2 fields.

portion of code

udtGradeScale(0).strGrades = "F"
udtGradeScale(0).intPoints = 0
udtGradeScale(1).strGrades = "D"
udtGradeScale(1).intPoints = 300

0 to 299 = F
300 to 349 = D

Since I'm only storing the minimum points, how do I search for the integers between the minimum and maximum in order to display the corresponding grade?
 
Something like this:

Visual Basic:
For i = 0 To udtGradeScale.Length - 2
    MsgBox(udtGradeScale(i).strGrades & " = " & udtGradeScale(i).intPoints.toString & " to " & udtGradeScale(i + 1).intPoints.toString)
Next i
i = udtGradeScale.Length - 1
MsgBox(udtGradeScale(i).strGrades & " = " & udtGradeScale(i).intPoints.toString & " and above")
 
Back
Top