VB .Net Question:
Download Job Interview Questions and Answers PDF
How do you define a read only property in a class module?
![VB .Net Interview Answer VB .Net Interview Question](/public/images/interview/20.webp)
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
Download VB .Net Interview Questions And Answers
PDF
Previous Question | Next Question |
What is non_deterministic finalization? | What is the source code for display the picture in button click event? |