title: Add comments to records - C# 9
body: <p>I'm looking for a way to add comments on record properties, in C# 9</p>
  <p>When I try this code :</p>
  <pre><code>public record Person
  {
      /// &lt;summary&gt;
      /// Gets the first name.
      /// &lt;/summary&gt;
      public string FirstName { get; init; }
      
      /// &lt;summary&gt;
      ///  Gets the last name.
      /// &lt;/summary&gt;
      public string LastName { get; init; }
  }
  </code></pre>
  <p>I get this warning :</p>
  <blockquote>
  <p>Non-nullable property 'FirstName' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.</p>
  </blockquote>
  <p>When I try :</p>
  <pre class="lang-cs prettyprint-override"><code>public record Person(string firstName, string lastName);
  </code></pre>
  <p>I get this warning:</p>
  <blockquote>
  <p>Missing XML comment for publicly visible type or member 'Person.firstName'</p>
  </blockquote>
  <hr />
  <p>This does not work either.</p>
  <pre class="lang-cs prettyprint-override"><code>/// &lt;summary&gt;
  /// Person.
  /// &lt;/summary&gt;
  /// &lt;param name=&quot;FirstName&quot;&gt;Get the first name.&lt;/param&gt;
  /// &lt;param name=&quot;LastName&quot;&gt;Get the last name.&lt;/param&gt;
  public record Person(string FirstName, string LastName);
  </code></pre>
  <p>Gives warning:</p>
  <blockquote>
  <p>XML comment has a param tag for 'FirstName', but there is no parameter by that name</p>
  </blockquote>