title: Error when adding element to list of objects
body: <p>I wish to dynamically create and save objects to a list. When program reachs the <code>add</code> method to add objects in the list I get an error: </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>What have I done wrong here?</p>
  
  <pre><code>List&lt;Category&gt; categoryList;
  
  public Main(string firstname, string lastname, string status)
  {
      InitializeComponent();
      label1.Text = (firstname + lastname + status).Trim();
  
      string connection = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Trgovina.mdf;Integrated Security=True";
      SqlConnection cn = new SqlConnection(connection);
  
      try
      {
          cn.Open();
      }
      catch (Exception) { MessageBox.Show("Error occurred during database communication!"); }
  
      string sqlQuery = "SELECT * FROM Kategorije_art";
      SqlCommand categoryCommand = new SqlCommand(sqlQuery, cn);
      SqlDataReader categoryDataRead = categoryCommand.ExecuteReader();
  
      categoryList.Add(new Category(1, "a")); //ERROR ?!
  }
  </code></pre>