Greetings,
I have a collection class and a windows application that will allow a user to input test scores. When the user inputs a score he or she will then click on the add score button. The add Score button will add that particular score to a collection.
I have 2 issues that assistance would be appreciated. First issue is that there is also several buttons for this application including Maximum Score and Minimum Score button. When you hit the Maximum button code similar to the following executes:
This function works fine as the correct results are displayed however for the minimum button when I change the comparison operator to < then after the 2nd Score is added to the collection the minimum score shows 0 when I haven't input 0 as a score result. ????
Second issue is that I don't know how to reset the collection. I wanted to add a reset button with code similar to the following:
This resets the display in the application window, however the maximum score, average score, minimum score buttons all retain their value. How can I reset the collection using VB .NET code?
Any help would be appreciated. Thanks,
The next Bill Gates.
I have a collection class and a windows application that will allow a user to input test scores. When the user inputs a score he or she will then click on the add score button. The add Score button will add that particular score to a collection.
I have 2 issues that assistance would be appreciated. First issue is that there is also several buttons for this application including Maximum Score and Minimum Score button. When you hit the Maximum button code similar to the following executes:
VB.NET:
Dim intScore As Integer
Dim intScore1 As Integer = 0
For Each NewScore in ScoreCollection
If ScoreCollection.Count is = 1 Then
intScore = NewScore
Else
intScore1 = NewScore
If intScore1 > intScore
intScore = intScore1
End if
End if
MessageBox.Show(intScore, "Maximum Score")
Second issue is that I don't know how to reset the collection. I wanted to add a reset button with code similar to the following:
VB.NET:
btnReset_Click(.......................
nudInputScoreAmount.Value = 0
TextBox1.Text = ""
TextBox2.Text = ""
ect.
Any help would be appreciated. Thanks,
The next Bill Gates.