0
You either need to declare newValue as a Private Integer field as Satyapriya has done or (in VB 2010 or later), you can replace the whole lot with the following:
Public Property Changeaheight as Integer
This is what's called an auto-implemented property and the VB.NET compiler replaces it with something similar to the previous code. However, the Private field is not directly accessible in this case and you always have to get or set the field via the Property. For example:
Changeaheight = 10
Console.WriteLine(Changeaheight) ' prints 10
0
Dim newValue As Integer
Public Property Changeaheight() As Integer
Get
Return newValue
End Get
Set(ByVal value As Integer)
newValue = value
End Set
End Property