title: Non-nullable property must contain a non-null value when exiting constructor. Consider declaring the property as nullable
body: <p>I have a simple class like this.</p>
  <pre><code>public class Greeting
  {
      public string From { get; set; }
      public string To { get; set; } 
      public string Message { get; set; }
  }
  </code></pre>
  <p>Strangely I get the following warning.</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Warning CS8618  Non-nullable property 'From' must contain a non-null value when exiting constructor. 
  Consider declaring the property as nullable.    MxWork.Elsa2Wf.Tuts.BasicActivities  
  D:\work\MxWork\Elsa2.0WfLearning\MxWork.Elsa2.0Wf.Tuts\src 
  \MxWork.Elsa2Wf.Tuts.BasicActivities\Messages\Greeting.cs   5   Active
  </code></pre>
  <p>I am baffled. These new kind of messages that it throws pulls down my confidence.
  I got them from all the three properties.
  And this has suddenly appeared.</p>
  <p>Can some one please suggest how this can be mitigated.</p>
  <p><a href="https://i.stack.imgur.com/0GjVJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0GjVJ.png" alt="visual studio warning message" /></a></p>
  <h2>Update</h2>
  <p>These days I have seen using <strong>default!</strong> like so, and its working.</p>
  <pre><code>public class Greeting
  {
      public string From { get; set; } = default!;
      public string To { get; set; } = default!;
      public string Message { get; set; } = default!;
  }
  </code></pre>
  <p>Also you may put a question mark symbol(?) to indicate that the type is nullable, if you feel appropriate as follows.</p>
  <pre class="lang-cs prettyprint-override"><code>public class Greeting
  {
      public string? From { get; set; };
      public string? To { get; set; };
      public string? Message { get; set; };
  }
  </code></pre>