470,817 Members | 1,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,817 developers. It's quick & easy.

How to convert type double to type bool in c#

i got an error "cannot covert the type double to type bool.
Feb 18 '08 #1
1 1848
7,872 Expert 4TB
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.
Feb 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by ma740988 | last post: by
14 posts views Thread by Chris | last post: by
2 posts views Thread by jiangyh | last post: by
2 posts views Thread by Christophe | last post: by
3 posts views Thread by mrajanikrishna | last post: by
6 posts views Thread by John | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.