M
Michael Jackson
I've converted a large .NET 1.1 app to .NET 2.0. I allowed the IDE to to the
conversion, and had basically no problems at all. However, the VB.NET
compiler give me several hundred Warnings, and most refer to a variable
being used before it is assigned a value. I have tons of subs and functions
where I Dim a variable at the top of the sub or function, outside any Try or
If blocks, (e.g Dim Result As String), then assign to that variable within
the Try or If block, and possibly return the variable or Dispose of it or
set it to nothing.
Is my coding technique wrong? How should I code this? Should I assign
String.Empty to string variables?
Thanks for any input.
Michael
conversion, and had basically no problems at all. However, the VB.NET
compiler give me several hundred Warnings, and most refer to a variable
being used before it is assigned a value. I have tons of subs and functions
where I Dim a variable at the top of the sub or function, outside any Try or
If blocks, (e.g Dim Result As String), then assign to that variable within
the Try or If block, and possibly return the variable or Dispose of it or
set it to nothing.
Is my coding technique wrong? How should I code this? Should I assign
String.Empty to string variables?
Thanks for any input.
Michael