Tech Off Post

Single Post Permalink

View Thread: C# 3.0: What I Want
  • User profile image

    The point was to *not* do these checks, but have .NET check and throw the exception for you.  C# and .NET are geared toward quickly producing quality code and this could only help that - while I (grudgingly) check all my public methods I'm sure there are a lot of coders out there who just assume things will never be null.

    Chances are you don't need a custom message, and if you do, don't mark it non-nullable and do the checks yourself.  It's a win-win idea.