title: Why is a DataRow recognized in one part of a method but not another (how can I dynamically add DataRows)?
body: <p>With this code:</p>
  
  <pre><code>OracleDataTable dt = PlatypusSchedData.GetAvailablePlatypi(); 
  OracleDataTable outputDt = new OracleDataTable();
  
  int iRows = 12;
  while (iRows &gt; 0)
  {
      outputDt.Rows.Add(new DataRow()); // line 1
      //var dr = new DataRow();     // line 2a
      //outputDt.Rows.Add(dr);      // line 2b
      iRows -= 1;
  }
  
  for (int i = 0; i &lt; dt.Rows.Count; i += 1) {
      DataRow dr = dt.Rows[i];
      int outputColumn = 0;
      if (i % 12 == 0 &amp;&amp; i &gt; 0) {
          outputColumn += 1; //2?
      }
      outputDt.Rows[i % 12][outputColumn] = dr[0];
      outputDt.Rows[i % 12][outputColumn + 1] = dr[1];
  }
  dataGridView1.DataSource = outputDt;
  </code></pre>
  
  <p>...I get this compile-time error using either line 1 (lines 2a and 2b commented out) or using lines 2a and 2b (with line 1 commented out):</p>
  
  <p><em>'System.Data.DataRow.DataRow(System.Data.DataRowBuilder)' is inaccessible due to its protection level</em></p>
  
  <p>This is baffling me because the DataRow in the for loop is tolerated. How can I add these DataRows to my OracleDataTable?</p>