First off please excuse me if i do not approach this correctly. This is the first time I have used this site for any help.
I am working on my midterm project due no later than sunday at midnight and i am stuck along with other students at the same points in this program in which we are using visual studio.net 2003
First i need to add all the numbers together that i have inside a list, secondly i have to search through the list and find the max number as well as the minimum number. I have looked all over for an operator that might do this and the only thing we have found close to one was MaxVal which did not work. We also tried using a For Next loop inside a With/End With and cannot get that to work either.
Here is the code so far for the Maximum value function
Function MyMaximum(ByVal ThisList As ListBox) As Integer
If (ThisList.Items.Count >= 0) Then
'may need to change the <= to a >= above
'<============================================>
' COMPLETE THIS FUNCTION to return the maximum value in the List passed in
Dim i As Integer
With ThisList.Items
End With
End If
Return 0
End Function
And this is what i have to work with for the Total problem...
Private Sub lblTotal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblTotal.Click
'<============================================>
' COMPLETE THIS FUNCTION to return the sum (or total) value in the List passed in
' By writing a new, separate function named MySumation()
' that accepts a listbox as the first argument
' checks that there is no trash in the list
' and returns a single precision value equal to the sum of the values in the list box.
End Sub
If anyone could help us with this it would be greatly appreciated. Thank you.