I have a class like this
Public Class Settings
Private _app_folder As String = ""
Public Property AppFolder() As String
Get
Return _app_folder
End Get
Set(ByVal value As String)
_app_folder = value
End Set
End Property [...]
Then in another class, I declare it
_settings = New Settings
and I set the value for each property
_settings.AppFolder = "test"
But how can I edit “_settings.AppFolder” property to “readonly” ?
In addition to RB’s answer you could implement an interface and use that (rather than the class) when you require read-only behavior of the property.