Answers

Question and Answer:

  Home  VB .Net

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

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

 144 views

More Questions for you: