title: How to check if datatable.PrimaryKey is set
body: <p>i have a datatable which i have to assign a primary key if it doesn't already have one. i tried :</p>
  
  <pre><code>if (ds.Tables[0].PrimaryKey == null)
  {
      ds.Tables[0].PrimaryKey = new DataColumn[] { dt.Columns["Naam"] };
  }
  </code></pre>
  
  <p>But the PrimaryKey (in this case) not null. When i checked it contained : {System.Data.DataColumn[0]} How can i check on that?</p>