title: Checking for Null in Constructor
body: <p>I'm really trying to figure out the best practices for reusable code that is easily debugged. I have ran into a common practice among developers that I don't quite understand yet.</p>
  
  <pre><code>public MyConstructor(Object myObject)
  {
      if (myObject == null)
          throw new ArgumentNullException("myObject is null.");
      _myObject = myObject;
  }
  </code></pre>
  
  <p>It almost seems unnecessary to do this check. But I think it's because I don't completely understand what the benefits of doing this check are. It seems like a null reference exception would be thrown anyway? I am probably wrong, would really like to hear some thoughts on it.</p>
  
  <p>Thank you.</p>