Coffeehouse Post

Single Post Permalink

View Thread: C# trivia question
  • User profile image
    cbae

    @JoshRoss: Yup. That is absolutely correct.

    ?? is a beautiful thing for that reason, yet I still this kind of code all the time:

    var someval = (SomeMethod() == null) ? String.Empty : SomeMethod();