Ebeworld’s Weblog

Trying to create

Nullabililty in C#

In C# using nullable values like int? would simplify database programming. Unfortunately, java doenst have nullables present until now. Some asked me to use wrapper classes like Integer, but it has 

a. Performance penalty 

b. Integer(1)!=Integer(1)

Also one nice thing is ?? operator which means “if null”.

int? a=null;

int j=a ?? 1;//j=1

November 22, 2008 - Posted by ebeworld | Uncategorized | | No Comments Yet

No comments yet.

Leave a comment