Idiotic error/problem....

  • Thread starter Thread starter Robin Tucker
  • Start date Start date
R

Robin Tucker

How is it possible for the debugger to show a value as "true", yet the code
path follow the result for "false"!?? This is what is happening with my
code below. oRapi.DevicePresent gives the value "True" in the
debugger/watch window. Yet the code follows the path for the value being
false!


Public Sub CheckRAPITest()

Dim oRapi As New OpenNETCF.Desktop.Communication.RAPI

Select Case oRapi.DevicePresent

Case False

Dim c as integer

c = 0 <breakpoint here>

Case True

oRapi.Connect(True) <breakpoint here>

End Select

End Sub
 
Robin said:
How is it possible for the debugger to show a value as "true", yet the code
path follow the result for "false"!?? This is what is happening with my
code below. oRapi.DevicePresent gives the value "True" in the
debugger/watch window. Yet the code follows the path for the value being
false!


Public Sub CheckRAPITest()

Dim oRapi As New OpenNETCF.Desktop.Communication.RAPI

Select Case oRapi.DevicePresent

Case False

Dim c as integer

c = 0 <breakpoint here>

Case True

oRapi.Connect(True) <breakpoint here>

End Select

End Sub

Maybe it's because it's comparing booleans? But it does seem odd.

I find it strange that you use a select case for this though, why not
use an if/then construction?

Rinze van Huizen
 
Back
Top