Home »

How is a property designated as readonly?

Question ListCategory: VB.NETHow is a property designated as readonly?
ethanbrown author asked 2 years ago
1 Answers
adamemliy16 author answered 11 months ago

In VB.NET: Public ReadOnly Property PropertyName As ReturnType
Get ‘Your Property Implementation goes in here
End Get
End Property

in C#
public returntype PropertyName
{
get{
//property implementation goes here
}
// Do not write the set implementation
}

Please login or Register to Submit Answer