S
shapper
Hello,
I am working on a custom control and I created a property and a "New"
method.
What is the right way to define the property in "New" method:
_Name = name
or
Me.Name = name
Here is my code:
' Name
Private _Name As String = String.Empty
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property ' Name
Public Sub New(ByVal name As String)
_Name = name
' OR
Me.Name = name
End Sub ' New
Thanks,
Miguel
I am working on a custom control and I created a property and a "New"
method.
What is the right way to define the property in "New" method:
_Name = name
or
Me.Name = name
Here is my code:
' Name
Private _Name As String = String.Empty
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property ' Name
Public Sub New(ByVal name As String)
_Name = name
' OR
Me.Name = name
End Sub ' New
Thanks,
Miguel