I'm having a problem with an app I'm working on. Currently you enter info into one of several text boxes, and then you hit a check answers button and it will evaluate all your answers and tell you if you are correct or not, and that works great. If your box is correct a button will appear with a secondary question which if answered correctly will "complete" that section. You still have the ability to go back and answer the remaining questions. And this works great. I'm running in to a problem with rechecking my answers, it's going back and reset my correct ones. I'm checking the answers with a class I created called evaluate, I think I was originally creating a new class each time I pressed the evaluate button. I thought I fixed it with this code
It seems to do nothing. Now I'm having doubts about my understanding of how classes and class instances work.
I want to call my class, work with it until a requirement is fullfilled (ex all elements in an a array go from true to false) then then if it's called it again it will be a new instance.
VB.NET:
Private Sub btnCheckAnswers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheckAnswers.Click
Dim i As Integer
setCurrent = i
If currentSession = False Then
currentSession = True
objEvaluate = New evaluate(i)
objEvaluate.checkAnswers()
ElseIf currentSession = True Then
objEvaluate.checkAnswers()
End If
End Sub
It seems to do nothing. Now I'm having doubts about my understanding of how classes and class instances work.
I want to call my class, work with it until a requirement is fullfilled (ex all elements in an a array go from true to false) then then if it's called it again it will be a new instance.