Just to give you an alternative to no if (maybe this is not the best approach in this case, but ...):
Dictionary<Boolean, String> strings = new Dictionary<Boolean, String>();
strings.Add(true, "Yes");
strings.Add(false, "No");
Then when you need the value:
String yesNo = strings[checkbox.Checked];
brian source
share