Question : Operator '>' can not be applied to operands of type double or decimal

I'm a bit baffled why I can not do this:

double speed = 100.0;

if ( speed < 200.0)
{
   // do something
}

what gives?

newbieweb

Answer : Operator '>' can not be applied to operands of type double or decimal

well, same play
1:
2:
3:
4:
5:
6:
decimal speed = 100.0;
decimal check_value = 200.0;
 
if (speed < check_value)
{
}
Random Solutions  
 
programming4us programming4us