Wahyu Kurniawan Blog


Some of your need maybe at here





See also: Other Geeks@INDC

Nullable in .NET 2.0

In .NET 1.1 we cannot set value null to integer or decimal data type.
But in .NET 2.0 we can do that.

Try this:

VB
Dim i As Nullable (Of Integer) = Nothing

C#
Nullable<int> i = null;

Share this post: | | | |

Comments

csharpindonesia said:

bedanya sama int? i; apa?

# April 5, 2007 11:24 AM

hgunawan said:

[datatype]? i is shorthanded notation from Nullable<[datatype]> i = null;

nullable datatype is part of generics in framework 2.0

# April 10, 2007 1:41 PM