VB .Net Question:
How do you define a read only property in a class module?

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
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
Previous Question | Next Question |
What is non_deterministic finalization? | What is the source code for display the picture in button click event? |