In VB.NET, what is the difference between
if foo is Nothing Then doStuff() End If
and
if foo=Nothing Then doStuff
foo is Nothing simply checks if `foo` is not assigned to any reference. foo=Nothing checks if the reference held by `foo` is equal to `nothing`
In VB, both statements will evaluate to the same value if foo has not been initialised
foo