title: How to suppress Possible Null Reference warnings
body: <p>I am playing with the nullable types in c# 8 and I found a problem that is bugging me.
  Suppose I have a method which takes a nullable parameter. When a parameter is null, I want to throw a specific Exception. But I want the method to be clean and check the parameter somewhere else. The check method throws an exception, so after the method the parameter can not be null. 
  Unfortunately, the compiler does not see that and throws warnings at me.
  Here's the method:</p>
  
  <pre><code>    public void Foo(string? argument)
      {
          GuardAgainst.Null(argument, nameof(argument));
          string variable = argument; // &lt;-- Warning CS8600  Converting null literal or possible null value to non - nullable type
          var length = argument.Length; //&lt;--Warning CS8602  Dereference of a possibly null reference
      }
  </code></pre>
  
  <p>Here's the check method:</p>
  
  <pre><code>    public static void Null(string? text, string paramName)
      {
          if (text == null)
              throw new ArgumentNullException(paramName);
      }
  </code></pre>
  
  <p>Now, I can suppress the warning like this:</p>
  
  <pre><code>#pragma warning disable CS8602
  var length = argument.Length;
  #pragma warning restore CS8602
  </code></pre>
  
  <p>but it kind of kills my intention to keep my code clean.
  So my question is: is there a nicer way to suppress the warnings? Or maybe tell a compiler that from now on the parameter is guaranteed to not be null?</p>