Variable initialisation

  • Thread starter Thread starter Max Christian
  • Start date Start date
M

Max Christian

Quick sanity check: in VB.NET 2003, is the function below guaranteed
*always* to return False?

Public Class myClass
Public Function testFunc()
Dim b as Boolean
Return b
End Function
End Class

(I'm getting a rare bug in deployed software that could be explained
by the Dim not forcing b=False.)

Thanks!
 
Max Christian said:
Quick sanity check: in VB.NET 2003, is the function below guaranteed
*always* to return False?

Public Class myClass
Public Function testFunc()
Dim b as Boolean
Return b
End Function
End Class

Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top