?? not only a way to say I'm confused

Sign in to queue

The Discussion

  • User profile image
    JLS

    This is not new.  It's been in C# since at least .NET 2.0, maybe longer.

  • User profile image
    Michael

    What I'm missing is a complementary version to make it easier to write:

    string foo = (bar == null) ? null : Foo(bar);

    But it's hard to not laugh outright at the obvious choice for it:

    string foo = bar !? Foo(bar)

Add Your 2 Cents