Cannot implicitly convert type 'bool' to 'double'
Author: mrsic
Creation Date: 5/31/2018 5:39 PM
profile picture

mrsic

#1
Hi,
i am not a programmer but i do my best.

CODE:
Please log in to see this code.


I have try put "sliderPrioLevel_LG.Value" (see comments) into the PrioCalculation but i am always getting the error "Cannot implicitly convert type bool to double. I thought i can save the line und put it into the PrioCalculation. Can anyone help me with this?
profile picture

Eugene

#2
Damir, just give it a thought. You're comparing two double values with a less (<) operator. The result is of course boolean: true or false. You cannot expect the "prio" to be a number.
profile picture

mrsic

#3
Thanks Eugene.
profile picture

superticker

#4
CODE:
Please log in to see this code.
The .Value property returns a double type, so you don't need the ConvertToDouble() call. The less than (<) operator has lower precedence over the minus (-) operator, so you don't need the parenthesis. I don't know why the 100.0 is in there.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).