Dot Net Capsules

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

My Photo
Name:

Co-founder at mymoneysage.in Result oriented Tech Leader Programmer, Sotware Architect, Techologist Polyglot software developer, expert in multiple tech stack Specialties: Machine learning, Artificial intelligence, Conversational Interface, RASA, AWS, Lex, REST, GraphQL, PWA, C#, .NET, ASP.NET, XML, Web services, Agile, SCRUM

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