Friday, December 14, 2007

C# .net New Features Nullable Types placing NULL to integer variable

Add this Code and try it amazing

intead of int a=0;

try this

int? a=null

if(a!=null)
{

}

Placing default value

int? i=null;

if(i==null)
{

}
else
{
int? b= a??0; //this shows if a is null it assign default as 0
}