c# - Int won't increment by 1 -
i'm trying increment value of int: counter
1 each time stakebtn
pressed.
here's i've tried far:
private void stakebtn_click(object sender, eventargs e) { int counter = 0; counter++; currentstakes.text = counter.tostring(); }
however, works 1 time- currentstakes
label not go above 1.
is able see going wrong?
obviously, increase 1 time, declare outside click,
int counter = 0; private void stakebtn_click(object sender, eventargs e) { counter++; currentstakes.text = counter.tostring(); }
Comments
Post a Comment