Luca,
> Actually the .NET Framework don't let you set Null
> (Nothing in VB) to an int, a bool, a DateTime, etc.
However! VB.NET treats Nothing as the default value for any type.
<blockquote>
Nothing is a special literal; it does not have a type and is convertible to
all types in the type system. When converted to a particular type, it is the
equivalent of the default value of that type.
</blockquote>
http://msdn.microsoft.com/library/de...BSpec2_4_7.asp
In other words, if you assign Nothing to an Integer that integer is set to
the 'default' value for an Integer which is Zero!
Try it!
Dim i as Integer = Nothing
Dim b As Boolean = Nothing
Dim c As Char = Nothing
Dim pt As Point = Nothing
If you run the above you will find each value has the defaults for that
value. (0, False, Char.MinValue (which the debugger displays as Nothing)).
Seeing as Point is a structure, the default for Point is the default for
each of its members, in other words pt.x = 0 & pt.y = 0.
Hope this helps
Jay
"Luca Minudel" <(E-Mail Removed)> wrote in message
news:2b57d01c3930b$ed903480$(E-Mail Removed)...
>
> Actually the .NET Framework don't let you set Null
> (Nothing in VB) to an int, a bool, a DateTime, etc.
>
> So BCL functions cannot return Null value for built-in
> types.
>
> If you need to set Null (Nothing in VB) to an int, a bool,
> a DateTime, ... you can use NullableTypes:
> http://nullabletypes.sourceforge.net/
>
> bye (luKa)
>
>