S
shapper
Hello,
Is there a difference between defining a control property in the
following two ways:
' Items ...
Private _Items As Generic.List(Of ListItem) = New Generic.List(Of
ListItem) ****
Property Items() As Generic.List(Of ListItem)
Get
Return _Items
End Get
Set(ByVal value As Generic.List(Of ListItem))
_Items = value
End Set
End Property ' Items
Or
' Items ...
Private _Items As Generic.List(Of ListItem) ****
Property Items() As Generic.List(Of ListItem)
Get
If _Items Is Nothing Then
****
_Items = New Generic.List(Of WebControl) ****
End
If ****
Return _Items
End Get
Set(ByVal value As Generic.List(Of ListItem))
_Items = value
End Set
End Property ' Items
I marked the differences with ****.
Which approach should I use?
Thanks,
Miguel
Is there a difference between defining a control property in the
following two ways:
' Items ...
Private _Items As Generic.List(Of ListItem) = New Generic.List(Of
ListItem) ****
Property Items() As Generic.List(Of ListItem)
Get
Return _Items
End Get
Set(ByVal value As Generic.List(Of ListItem))
_Items = value
End Set
End Property ' Items
Or
' Items ...
Private _Items As Generic.List(Of ListItem) ****
Property Items() As Generic.List(Of ListItem)
Get
If _Items Is Nothing Then
****
_Items = New Generic.List(Of WebControl) ****
End
If ****
Return _Items
End Get
Set(ByVal value As Generic.List(Of ListItem))
_Items = value
End Set
End Property ' Items
I marked the differences with ****.
Which approach should I use?
Thanks,
Miguel