In Visual Basic 6.0, the Null keyword indicated that a variable contained no valid data, and the IsNull function was used to test for Null. In Visual Basic .NET, the Null keyword is still a reserved word, but it has no syntactical value; the IsNull function is no longer supported. In addition, Visual Basic 6.0 supported Null propagation — when Null was used in an expression, the result of the expression would also be Null. Null propagation is no longer supported in Visual Basic .NET.
During upgrade, Null is converted to DBNull, and IsNull is converted to IsDBNull. The behavior of DBNull is slightly different than that of Null. Null could be used in functions and assignments; DBNull cannot.
Where Null was used with a Variant data type, the Variant is converted to Object during upgrade; it may be more appropriate to use the Nothing keyword or the IsNothing function.
What to do next
See Also
IsDbNull Function | DBNull Class