The algorithm I use looks like this:
Dim Min As Integer = Data(0)
For Each val As Integer In Data
If Min < val Then Min = val
Next
'Min now contains the first minimum value
Basically, set your minimum holder to the first element. Then iterate through the set: if the element is less than the current minimum, it becomes the minimum. If the element is the same as the current minimum, it is passed by. (This is useful only when dealing with complex objects where you are looking for the minimum of, say,
MyUser.LastLogon
.)
I leave it as an excercise to rewrite this to find the maximum value. ;P