What is the difference between these two methods for defining property value defaults?
Code:Public intSomeInt As Integer Public strSomeString As String Public objSomeObject As Object Public booTrueFalse As Boolean Sub New() intSomeInt = 100 strSomeString = "DefaultString" objSomeObject = strSomeString booTrueFalse = True End SubIs there a reason to use one method over the other for defining the default property values in a class?Code:Public intSomeInt As Integer = 100 Public strSomeString As String = "DefaultString" Public objSomeObject As Object = strSomeString Public booTrueFalse As Boolean = True Sub New() 'Constructor code here End Sub




Reply With Quote