R
Ron
Hello,
I created an array of label controls like this:
Dim lbl() As Label = {Me.lbl1, Me.lbl2, Me.lbl3}
and was able to iterate through the array. But then I saw
another way to declare the same array:
Dim lbl() As Label = New Label(){Me.lbl1, Me.lbl2, Me.lbl3}
Both ways seems to work fine, but I want to get in the
practice of doing this correctly. Is there a difference
between using New or not for this? If so, what is the
difference?
Thanks,
Ron
I created an array of label controls like this:
Dim lbl() As Label = {Me.lbl1, Me.lbl2, Me.lbl3}
and was able to iterate through the array. But then I saw
another way to declare the same array:
Dim lbl() As Label = New Label(){Me.lbl1, Me.lbl2, Me.lbl3}
Both ways seems to work fine, but I want to get in the
practice of doing this correctly. Is there a difference
between using New or not for this? If so, what is the
difference?
Thanks,
Ron