ReadOnly in C # vs in VB.NET
In VB.NET, a read-only property is usually created to be read only from the outer class. If you want to set this property, you can easily do it from within the class by modifying a valid local variable.
So, for example, in VB 2010
Public ReadOnly Property SomeVariable() As String
or in earlier versions,
Private _SomeVariable As String Public ReadOnly Property SomeVariable() As String Get Return _SomeVariable End Get End Property
you can set it from your class like:
_SomeVariable = somevalue
The property value cannot be changed from an external class.
source to share