Moving forwards from VS2003 to VS2005 (VB) I have a load of warings to resolve.
Most of these are 'x is used before it has been assigned a value. A null reference exception may result'.
This stem from:-
dim x as someobject
.....
.....
if x is nothing then
.......
end if
Now if I change the declaration to:-
dim x as someobject = nothing
then it's OK.
So, where can I find some guidance on this (stuffed if I can find anything about anything in the help).
It's not a problem being explicit of course, it's just I'd like some background
Most of these are 'x is used before it has been assigned a value. A null reference exception may result'.
This stem from:-
dim x as someobject
.....
.....
if x is nothing then
.......
end if
Now if I change the declaration to:-
dim x as someobject = nothing
then it's OK.
So, where can I find some guidance on this (stuffed if I can find anything about anything in the help).
It's not a problem being explicit of course, it's just I'd like some background
Comment