> Sure, but be warned, it's complicated... :)
>
> myCheck.Checked = (IsInterested.equals("yes")) ? true : false;
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
>> Sure, but be warned, it's complicated... :)
>>
[quoted text clipped - 6 lines]
>
> Hilton
Hilton - 10 Oct 2007 20:26 GMT
Chris wrote:
> Well, if we're going to pick nits related to pet peeves, the comparision
> should really be right:
[quoted text clipped - 4 lines]
> Ya never know when some dev down the line will use "Yes" instead of "yes".
> (I know, this is a strange pet peeve, but....)
I totally agree with you. I use string.Compare (x, y, true) since CF 1.1
does not have the method you used. I wonder which is faster on .NET
(non-CF).
Hilton