title: Properties in Structures: "Expression is a value and therefore cannot be the target of an assignment."
body: <p>I have the following 2 structures, and I don't really understand why the second one does not work: </p>
  
  <pre><code>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
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/I3aGY.png" alt="enter image description here"></p>
  
  <p><strong>More detailed explanation:</strong> I have some obsolete code that uses structures instead of classes. So I need to identify a moment when a filed of this structure changes to the wrong value.</p>
  
  <p>My solution to debug was to replace the structure filed by a property with the same name, and then I just set a breackpoint in the property setter to identify the moment when I receive the wrong value... in order do not rewrite all the code.... just for debugging purpose. </p>
  
  <p>Now, I faced the problem above, so I don't know what to do... only setting the breakpoint everywhere this member of structure is assigned, but there is a lot of lines with that assignment... </p>