title: NullReference exception when using List.Add<t>, would like to understand it
body: <p>I have a settings class that looks like the following:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Class for pipeline settings
  /// &lt;/summary&gt;
  public class PipelineSettings
  {
      /// &lt;summary&gt;
      /// List of jobs to process
      /// &lt;/summary&gt;
      [JsonProperty("jobs")]
      public List&lt;PipelineJob&gt; Jobs;
  
      // todo: make private and create FetchCredentials(id)
      /// &lt;summary&gt;
      /// List of credentials information cataloged by id
      /// &lt;/summary&gt;
      [JsonProperty("credentials")]
      public List&lt;PipelineCredentials&gt; Credentials;
  
  
  }
  </code></pre>
  
  <p>And a credentials class that looks like the following:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Class to hold credentials for pipeline jobs
  /// &lt;/summary&gt;
  public class PipelineCredentials
  {
      /// &lt;summary&gt;
      ///  The id for the current credential  to be used when referring to it within
      ///  other areas of json settings files
      /// &lt;/summary&gt;
      [JsonProperty("id")]
      public int Id;
  
      /// &lt;summary&gt;
      /// Username or login string for the current system
      /// &lt;/summary&gt;
      [JsonProperty("username")]
      public string Username;
  
      // refine: AES auto encrypt?
      /// &lt;summary&gt;
      /// The password for the active authentication. If not encrypted then it
      /// will be automatically converted into an AES encrypted string
      /// &lt;/summary&gt;
      [JsonProperty("password")]
      public string Password;
  
      [JsonProperty("path")]
      public string UNCPath;
  }
  </code></pre>
  
  <p>I've built the following to try to add a new credential to my list:</p>
  
  <pre><code>var settings = new PipelineSettings();
  
  // Build credentials for storage
  var credentials = new PipelineCredentials();
  credentials.Id = 1;
  credentials.Username = "testUsername";
  credentials.Password = "test_password";
  credentials.UNCPath = null;
  
  // Add credentials to the current settings class
  settings.Credentials.Add(credentials);
  
  var json = new JsonSerializeHelper();
  
  Console.Write(json.Serialize(settings));
  
  Console.ReadKey();
  </code></pre>
  
  <p>And when I do, I'm receiving a null reference exception on the following line:</p>
  
  <pre><code>settings.Credentials.Add(credentials);
  </code></pre>
  
  <p>I don't know what I don't know - how should I be adding new items into a list if they're prebuilt?</p>