.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

iphone - Using nested NSDictionary with Picker -

javascript - Iterate over array and calculate average values of array-parts -

php - Time zone issue -