title: Error "Object Reference not set to an Instance of an object" on read from DataGrid
body: <p>Ok so I just did a quick test to see if my code was set to read properly from the DataGrid, and it does, but once it finishes reading I get the error <code>"Object reference not set to an Instance of an object"</code> and I'm not sure what it's referring to. Is it because the loop continues after the <code>rows</code> has reached the end of the DataGrid?</p>
  
  <pre><code>public static void UploadFromExtrernalSource(PlantAreaCode_CreateView PACCreate)
  {
      // For each row in the DataGrid, and for each column, stores the information in a string.
      for (int rows = 0; rows &lt; PACCreate.dataGridView1.Rows.Count; rows++)
      {
          for (int col = 0; col &lt; PACCreate.dataGridView1.Rows[rows].Cells.Count; col++)
          {
              string value = PACCreate.dataGridView1.Rows[rows].Cells[col].Value.ToString();
              Console.WriteLine(value + ",");
          }
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong> Also when I print to console, it prints each value on a new line. Why?</p>