vbNullString
is just
null
(or
Nothing
). Check to see if
value
is
null
(
Nothing
) first. If it's
null
, then do not call
ToString
on it.
Here's some C# code that does this:
String strValue = value == null ? null : value.ToString();
Here's an automatic conversion to VB syntax (not sure how good it is):
Dim strValue As [String] = If(value Is Nothing, Nothing, value.ToString())