Well, if we're going to pick nits related to pet peeves, the comparision
should really be right:
myCheck.Checked = IsInterested.Equals("yes",
StringComparison.OrginalIgnoreCase);
Ya never know when some dev down the line will use "Yes" instead of "yes".
(I know, this is a strange pet peeve, but....)
We could keep going, and be really silly...
public Struct YesNo
{
private bool _yesOrNo;
...
public bool IsYes{ get { ... } set {...}}
public bool IsNo{ get { ... } set{...}}
}
--
Chris Mullins
"Hilton" <no****@nospam.comwrote in message
news:1j*****************@newssvr11.news.prodigy.ne t...
"Chris Mullins [MVP - C#]" <cm******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Sure, but be warned, it's complicated... :)
myCheck.Checked = (IsInterested.equals("yes")) ? true : false;
myCheck.Checked = IsInterested.equals("yes");
Sorry, just a pet peeve of the "if (x) y=true; else; y=false;" variant
(instead of just "y=x").
Hilton