Hello -
I was wondering what the proper way is to initialize member variables
of a Class. Here is the code ...
Public Class
Private mX As Single = Single.NaN
...
Public Sub New()
mX = Single.NaN
End Sub
End Class
Do I need the New in this case or is it fine to just initialize them
with the declaration? Which is the better style?
Thanks!
Joe
I was wondering what the proper way is to initialize member variables
of a Class. Here is the code ...
Public Class
Private mX As Single = Single.NaN
...
Public Sub New()
mX = Single.NaN
End Sub
End Class
Do I need the New in this case or is it fine to just initialize them
with the declaration? Which is the better style?
Thanks!
Joe
Comment