Frans Bouma's blog

Generator.CreateCoolTool();

Syndication

News



    Visit LLBLGen Pro's website

    Follow me on Twitter

    Add to Technorati Favorites

About me

Fun stuff I created

My work

No nullable types in VB.NET 2.0 ?

As an O/R mapper developer I was looking forward to nullable types in .NET 2.0, so I could solve the problem of nullable value types in a solid way, but I just peeked into the new online .NET 2.0 Beta 2 documentation for VB.NET but I couldn't find any reference about nullable types in VB.NET.

I hope it's me overlooking something obvious, so my question is: does VB.NET have nullable types in .NET 2.0 ?

Edit I see there is a System.Nullable<T>. That would solve it to some degree I think. Any takers?

Edit2 Ok, the following links provide more information about how to use nullable value types in VB.NET 2.0:
http://blogs.msdn.com/vbteam/archive/2004/05/28/143813.aspx
http://www.panopticoncentral.net/archive/2004/06/04/1180.aspx

Good to know I was overlooking something!

Published Saturday, April 16, 2005 11:46 AM by FransBouma

Filed under:

Comments

# re: No nullable types in VB.NET 2.0 ?@ Saturday, April 16, 2005 5:54 AM

Hoi Frans,

Volgens het VB team zou het zo kunnen:

ByVal id As Nullable(Of Integer)

zie http://blogs.msdn.com/vbteam/archive/2004/05/28/143813.aspx

Bye,

Ward

Ward

# re: No nullable types in VB.NET 2.0 ?@ Saturday, April 16, 2005 5:58 AM

Dank je, Ward :)

Ik had ook al zoiets gezien even later. Dus kortweg komt het er op neer dat het wel aanwezig is, maar je moet het generic Nullable struct gebruiken ipv de operators. Maakt me verder niet uit ALS het maar werkt :D.

Frans Bouma

# re: No nullable types in VB.NET 2.0 ?@ Saturday, April 16, 2005 6:17 AM

http://www.panopticoncentral.net/archive/2004/06/04/1180.aspx

Daniel Moth

# NotNull@ Tuesday, May 03, 2005 11:05 PM

TrackBack