.net - Set a string when a CheckBox has been checked (C#) -


i have check box in winforms, when checked set string e.g.:

string checkbox = true 

edit: or better example:

bool checkbox = true; 

so when method run lookup string , dependent on it's value perform a submethod...

so question how set string on checkbox when clicked, have checked actions list , closest "checkchanged", won't work.

why checkchanged not work?

bool checkbox = false; private void checkbox1_checkedchanged(object sender, eventargs e) {     if (checkbox1.checked)    {       checkbox = true;    } } 

or use checkbox1.checked in subroutine.


Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

java - Why is BlockingQueue.take() not releasing the thread? -

jQuery Ajax Render Fragments OR Whole Page -