Dot Net Capsules

A Capsule on .NET, everyday, keeps you .NetHealthy!!!!

My Photo
Name:

Programmer. Visit my new blog at www.ashishsheth.com

Tuesday, May 19, 2009

C# Null Coalesce operator

Just found that C# has a Null Coalesce operator ??. I was not aware of it earlier.
This is how you can use it:

int? nullInt = null;
notNullInt = nullInt ?? 1;
Console.WriteLine(notNullInt.ToString());


Just Also see here and here for some good info on Nulls.

Labels: , ,

1 Comments:

Blogger RRave said...

Dear Sir,

I have a launched new web site for .NET programming resources. www.codegain.com. I would like to invite to the codegain.com as author and supporter. I hope you will joins with us soon.

Thank You
RRaveen
Founder www.codegain.com

Sun Jun 07, 04:01:00 PM  

Post a Comment

<< Home

You Visitor Number:
Free Web Site Counter
Free Counter
free counters