How to count by one on a Windows form Application (C# Visual Studio) -


i have school project wants me make windows form application in c#. each time click button should add 1.

this first idea, says "use of unsigned local variable. if set z 0 @ start problem resets each time click button. ideas?

int z; z = z + 1; txtbox.text = z.tostring(); 

i hope makes sense. new asking these types of questions online. thank you

you declaring 'z' variable inside button click event scope, try declaring above onclick method, make sure initialize 0

int z = 0; private void button_click... 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -