?? returns the default value of its type if the value is null.
using System;
using System.IO;
class Test
{
static void Main()
{
int? i = null;
int j = i ?? 0;
Console.WriteLine(j);
}
}
The output:
0
| w__w__w___.__ja__v_a___2s__._c___o___m___ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |