title: Convert DataTable to object[,]
body: <p>How convert DataTable to Array?</p>
  
  <p>Source my converter from DataTable to object[,] </p>
  
  <pre><code>        uint rows = (uint)table.Rows.Count; 
          uint columns = (uint)table.Columns.Count;
  
          var data = new object[rows, columns];
          int i = 0;
          foreach (System.Data.DataRowView drv in table.DefaultView)
          {
              System.Data.DataRow ViewRow = drv.Row;
              data[i] = drv.Row.ItemArray.Clone() as object[];// Wrong number of indices inside []; expected 2    
  
              i++;
          }
  </code></pre>