mardi 24 mars 2015

If Statement with Boolean Condition

I've got some really simple code in visual studio that, for whatever reason, is not working. I've narrowed the problem down to my boolean condition in the if statement. Here is a simplified version:



If bool = true
bool = false
ElseIf bool = false
bool = true
End If


This is within a button click event. If bool is initially set to true, when I click it, it goes to false, but then if I click it again the "bool = false" statement is not executed.


Aucun commentaire:

Enregistrer un commentaire