Hi Dave,
I assumed that typeCheck is a checkbox & typeList is a DropDownList/ComboBox
or Listbox
If so I got a warning saying that "Possible unintended reference
comparison; to get a value comparison, cast the left hand side to type
'string'" refering to the comparision between a object ( SelectedItem ) and
a string.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Dave Bailey" <an*******@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
When running the following code:
if (typeCheck.Checked == true && typeList.SelectedItem == "3")
{
return " and wopm3 = '3' or wopm3 = '3C' or wopm3 = '3I'";
}
I get the following error:
Operator '&&' cannot be applied to operands of type 'bool'
Hoiw can I alter my code to handle this error?
Thanks,
Dave