Question Display highest number in record?

MrAlex

New member
Joined
Dec 14, 2010
Messages
1
Programming Experience
1-3
Hello,

I've got a record set up in a VB.NET project, but I was wondering how I would make it display the highest value in a certail field of that record. Are there any variables/functions I can use?

My Record Structure:
VB.NET:
Module Module1
    Public Index As Integer
    Public NumberOfStudents As Integer
    Structure StudentType
        Dim StudentName As String
        Dim Mark1 As Short
        Dim Mark2 As Short
    End Structure
    Public Students(9) As StudentType
End Module
The value of Mark1:
VB.NET:
            Students(Index).Mark1 = txtMark.Text
And how I want to display the highest value of Mark1:
VB.NET:
        lblHighestName.Text = ???
Thanks in advanced.
 
Back
Top