Module modForEach
Sub Main()
Dim gradeArray As Integer(,) = New Integer(,) _
{{77, 68, 86, 73}, {98, 87, 89, 81}, {70, 90, 86, 81}}
Dim grade As Integer
Dim lowGrade As Integer = 100
For Each grade In gradeArray
If grade < lowGrade Then
lowGrade = grade
End If
Next
Console.WriteLine("The minimum grade is: {0}", lowGrade)
End Sub ' Main
End Module
|