VB .Net Question: Download VB .Net PDF

How do you define a read only property in a class module?

Tweet Share WhatsApp

Answer:

Public Class YourClass
Private yourName As String
Private yourNumber As Decimal

Public Sub New(breed As String)
yourName = breed
End Sub

Public ReadOnly Property Name() As String
Get
Return yourName
End Get
End Property

Download VB .Net PDF Read All 69 VB .Net Questions
Previous QuestionNext Question
What is non_deterministic finalization?What is the source code for display the picture in button click event?