Q
Qwert
Hello,
question about following code:
Class MariaBello
Private intCount As Integer = 0
Private objLauraLinney As New LauraLinney()
End Class
Class TylerDurden
Private intCount As Integer
Private objLauraLinney As LauraLinney
Public Sub New()
intCount = 0
objLauraLinney = New LauraLinney()
End Sub
End Class
Is there any difference between the 2 methods of giving intCount its value?
Exceptions may occure when creating a new object, so you could catch them
inside New(), but other than that, what is the prefered method of creating
the new object and why?
Thanks.
question about following code:
Class MariaBello
Private intCount As Integer = 0
Private objLauraLinney As New LauraLinney()
End Class
Class TylerDurden
Private intCount As Integer
Private objLauraLinney As LauraLinney
Public Sub New()
intCount = 0
objLauraLinney = New LauraLinney()
End Sub
End Class
Is there any difference between the 2 methods of giving intCount its value?
Exceptions may occure when creating a new object, so you could catch them
inside New(), but other than that, what is the prefered method of creating
the new object and why?
Thanks.