I’m converting a lot of code from VB.net to c# and here is another issue I think cropped up during the conversion.
if (sRow.Cells[1].Value == true)
Worked = "X";
else if (sRow.Cells[2].Value == true)
Vacation = "X";
else if (sRow.Cells[3].Value == true)
Sick = "X";
else if (sRow.Cells[4].Value == true)
Holiday = "X";
on each of the if / else / else if lines it gives me this error. I’m sure I am missing something that will force me to do a head bonk…
Error 7 Operator ‘==’ cannot be applied to operands of type ‘object’ and ‘bool’
Are you sure that these values are of type
bool?If so, just explicitly cast: