agrees
asked on
Easy newbie question: how to get a checkbox's status
Hi All,
I'm a complete and utter newbie to C# as this question will demonstrate...
I have a windows form containing a checkbox and all I want to do is read in whether the checkbox is ticked or not. I would have thought this would do it:
myCheckbox.Checked()
but it doesn't - the compiler complains that "Checked" is a property and not a function. Could someone please help me? MSN is fairly useless and google searches throw up a vast amount of irrelevant information - experts-exchange is my only hope! :)
Alex
I'm a complete and utter newbie to C# as this question will demonstrate...
I have a windows form containing a checkbox and all I want to do is read in whether the checkbox is ticked or not. I would have thought this would do it:
myCheckbox.Checked()
but it doesn't - the compiler complains that "Checked" is a property and not a function. Could someone please help me? MSN is fairly useless and google searches throw up a vast amount of irrelevant information - experts-exchange is my only hope! :)
Alex
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Odd.. I'm sure that didn't work yesterday - oh well, thanks :)
{
MessageBox.Show("Its checked");
}
else
{
MessageBox.Show("its not checked");
}