title: Mark parameters as NOT nullable in C#/.NET?
body: <p>Is there a simple attribute or data contract that I can assign to a function parameter that prevents <code>null</code> from being passed in C#/.NET?  Ideally this would also check at compile time to make sure the literal <code>null</code> isn't being used anywhere for it and at run-time throw <code>ArgumentNullException</code>.</p>
  
  <p>Currently I write something like ...</p>
  
  <pre><code>if (null == arg)
    throw new ArgumentNullException("arg");
  </code></pre>
  
  <p>... for every argument that I expect to not be <code>null</code>.</p>
  
  <p>On the same note, is there an opposite to <code>Nullable&lt;&gt;</code> whereby the following would fail:</p>
  
  <pre><code>NonNullable&lt;string&gt; s = null; // throw some kind of exception
  </code></pre>