I have the following 2 structures, and I really don't understand why the second one does not work:
Module Module1 Sub Main() Dim myHuman As HumanStruct myHuman.Left.Length = 70 myHuman.Right.Length = 70 Dim myHuman1 As HumanStruct1 myHuman1.Left.Length = 70 myHuman1.Right.Length = 70 End Sub Structure HandStruct Dim Length As Integer End Structure Structure HumanStruct Dim Left As HandStruct Dim Right As HandStruct End Structure Structure HumanStruct1 Dim Left As HandStruct Private _Right As HandStruct Public Property Right As HandStruct Get Return _Right End Get Set(value As HandStruct) _Right = value End Set End Property End Structure End Module

More detailed explanation: I have legacy code that uses structures instead of classes. Therefore, I need to determine the moment when the correction of this structure will change to the wrong value.
My debugging solution was to replace the structure filed by a property with the same name, and then I just set a breakpoint in the property adjuster to determine when I get the wrong value ... so as not to rewrite all the code .... only for the purpose of debugging.
Now I am faced with the problem above, so I do not know what to do ... only setting a breakpoint wherever this member of the structure is assigned, but there are many lines with this destination ...
source share