title: c# adding row to datatable which has an auto increment column
body: <p>I've a datatable, with column A, B, C. I've set column A's "is identity" property to true, but I can't add any row to the table now.</p>
  
  <p>The code I'm trying is this:</p>
  
  <pre><code>dsA.dtA row = dsA.dtA.NewdtARow();
  
  row.B = 1;
  row.C = 2;
  
  dsA.dtA.Rows.Add(row);
  </code></pre>
  
  <p>I'm getting NoNullAllowedException, but I don't understand why. Column A is PK as well. If I tried to set row.A = 5 (or any similiar) I'll get an error when I try to update the datatable saying "cannot insert explicit value for identity column in table when identity_insert is set to off"</p>
  
  <p>How can I solve this issue? It's frustrating.</p>