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 Question
VB .Net Interview Question

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?