This message was edited by iwilld0it at 2005-11-29 12:17:59
Public Class xx
Property h()
Get
Return h
End Get
Set(ByVal Value)
h = Value
End Set
End Property
End Class
The part in bold is causing the stack overflow because you are recusively causing property h to be re-set. The mere assignment is causing the Set portion of the property statement to be re-executed (think about it.)
The proper way to do it is this ...
Public Class xx
Private mH
Property h()
Get
Return mH
End Get
Set(ByVal Value)
mH = Value
End Set
End Property
End Class
This is the typical pattern to assigning a property value to internal private variable (This is what encapsulation is.)