null == 0 // False Nothing = 0 ' True false == null // False False = Nothing ' TrueTaken from the official documentation: Nothing represents the default value of any data type. For reference types, the default value is the null reference. For value types, the default value depends on whether the value type is nullable.
There doesn't appear to be an equivalent of pure null in vb.net, you would have to check if it was a reference or value type explicitly. I don't like the implicitness of Nothing, but it fits with vb.net's general implicit conversions (which I also don't like).
False = 0 ' True "1" = 1 ' True ' etc. etc.
No comments:
Post a Comment