I have a class classed class1.vb, it has a public property named prop1 with a get and a set clause. I add one to the value passed in the set clause and in the get clause return the value variable as determined in the set clause. However, I get an error on the variable in the get clause…
Public Property prop1()
Get
Return value
End Get
Set (value)
value = value +1
End Set
End Property
any ideas?
Try setting the type of the property and try changing your
valuevariable to something else, since theSetis using it’s own local variable of the same name: