Variable initialisation

  • Thread starter Thread starter JohnFol
  • Start date Start date
J

JohnFol

If you look at the following two pieces of code they perform exactly the
same task

Dim sMessage As String
sMessage = "Hello!"

Dim sMessage As String = "Hello!"

Is there any difference "behind the scenes" where one of the following is
preferable to the other, or is this just personal preference?
 
Back
Top