VB .Net Question:
Download Questions PDF

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

Download VB .Net Interview Questions And Answers PDF

Previous QuestionNext Question
What is non_deterministic finalization?What is the source code for display the picture in button click event?