Public Property Changeaheight() As Integer
Get
Return newValue
End Get
Set(ByVal value As Integer)
newValue = value
End Set
End Property
and int shows me an error int the newValue parameter. this kind of error:
and int shows me an error int the newValue parameter. this kind of error:
newValue' is not declared. It may be inaccessible due to its protection level
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

VulpesPosted Feb 26, 2013, 10:34 AM
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
Satyapriya NayakPosted Feb 26, 2013, 10:09 AM