How to convert type double to type bool in c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KamalaChandru
    New Member
    • Feb 2008
    • 1

    How to convert type double to type bool in c#

    i got an error "cannot covert the type double to type bool.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well since you posted nothing about your problem, I would say, figure out what values of a double you want to mean "true" and what values you want to mean "false", and then go from there.

    However I would guess that you are just blanket trying to assign a double to a boolean because you didn't notice that one of them was not the same data type as the other. Go to the offending line and correct the problem.

    Comment

    Working...