Value returning from class is not what it is set to
This is mind boggling and I have no idea what is going.
I have a Threadpool worker like this which updates a class property.
Private Sub UpdateValues()
Do While ThreadsAreAGo = True
'do stuff
ClassValue.On = true
loop
End Sub
This has a bunch of loops and ifs but I have already checked and studied
it extremely to make sure its putting out the right value, which it is.
In the class I have
Private c_on As Boolean = false
Property On As Boolean
Get
Return c_on
End Get
Set(ByVal value As Boolean)
c_on = value
End Set
End Property
I have checked, by adding Debug.writeline(value) into the set, that it is
in fact getting the correct value at all times and not switching. Now
whenever I call ClassValue.On its ALWAYS false. I tried removing the =
false bit on the variable declaration. At first I thought it was because I
was calling it from javascript, but even when I add Debug.writeline(c_on)
in the get, it says false also! I have checked all references and nothing
sets it to bloody false, nothing!. I truly have no idea, especially since
my class has about 10 other properties that work in the same way and they
are perfectly fine.
No comments:
Post a Comment