Home »

How is a property designated as readonly?

Question ListCategory: VB.NETHow is a property designated as readonly?
ethanbrown author asked 8 years ago
1 Answers
adamemliy16 author answered 8 years 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