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

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -