title: How do I create an auto-implemented list property in a class in C#?
body: <p>To begin with I made a class with fields like this:</p>
  
  <pre><code>class Person
  {
      public string name;
      public List&lt;Thing&gt; things = new List&lt;Thing&gt;();
  
      public Person(string name)
      {
          this.name = name;
      }
  }
  </code></pre>
  
  <p>and directly changed the field <code>things</code> outside the class, but later found out that this is not the best practice as the fields of class should be private and accessed using public properties instead. I decided to change these fields into auto-implemented properties, as I currently don't require any validation within the properties:</p>
  
  <pre><code>class Person
  {
      public string Name { get; set; }
      public List&lt;Thing&gt; Things { get; set; }
  
      public Person(string name)
      {
          this.Name = name;
      }
  }
  </code></pre>
  
  <p>According the MSDN page for auto-implemented properties (<a href="https://msdn.microsoft.com/en-us/library/bb384054.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/bb384054.aspx</a>), the compiler creates a private backing field for the property.  </p>
  
  <p>However, with a list property <strong>I'm not sure whether the compiler automatically instantiates the list backing field</strong>, so my question is <strong>will having the lists as auto-implemented properties work as in the second example above</strong>, or <strong>do I need to instantiate the lists as well</strong>, and if so how should I do this?</p>