How to write property in VB.Net?

 Posted by Rajesh_Kumar on 2/14/2014 | Category: VB.NET Interview questions | Views: 4370 | Points: 40

Dim _first_name As String

Public Property First_Name() As String
Return _first_name
End Get
Set(ByVal value As String)
_first_name = value
End Set
End Property

For assigning value to First_Name property as
First_Name = "Rajesh" - Set Property

to get the value from First_Name
Dim emp_first_name As String = First_Name - Get Property

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response