Just sharing some of my inconsequential lunch conversations with you... RSS  

Friday, September 21, 2007

The C# ?? null coalescing operator

This is a cool operator that is new to me. Coalescing is normal operation over databases, and it was brought to C#.

We simply use it like:

return somenullablevariable ?? "oops, data was null";


Pick it from ScottGu, where it extend it's usage to LINQ

No comments:

Development Catharsis :: Copyright 2006 Mário Romano