[nem-en] Operator ??

Michal Moskal michal.moskal at gmail.com
Fri Sep 22 17:21:23 CEST 2006


On 9/17/06, Igor Tkachev <it at rsdn.ru> wrote:
> Hi All,
>
> C# has the ?? operator which is the shortest form of the short if:
>
> a = b == null ? c : b;
>
> Instead of this we can write the following:
>
> a = b ?? c;
>
> It came with nullable types, but also works fine with reference types.
>
> Can we get something like that?

If C# 3.0 has it, I'm for including the macro mentioned by Ivan in the
standard library.

As far as I understand it should also work with nullable types?

-- 
   Michał


More information about the devel-en mailing list