title: DataRow.ItemArray does not have values and is empty
body: <p>my DataRow object is emtpy no matter how I try to initialize it. Here is the source code:</p>
  <pre><code>private DataTable ReadFileIntoDb(MemoryStream file)
      {
          
  
          file.Position = 0;
          var sr = new StreamReader(file,Encoding.GetEncoding(1251),true);
  
  
          var dt = new DataTable();
          Console.WriteLine(&quot;datatable success&quot;);
  
          dt.Columns.Add(new DataColumn(&quot;description&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;code&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;cardnumber&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;costcentrecode&quot;, typeof(int)));
          dt.Columns.Add(new DataColumn(&quot;costcentre&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;article_description&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;trans_date&quot;, typeof(DateTime)));
          dt.Columns.Add(new DataColumn(&quot;article_price&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;article_quantity&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;netto&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;brutto&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;mwst&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;beleg&quot;, typeof(Double)));
          dt.Columns.Add(new DataColumn(&quot;oberverkaufsgruppe&quot;, typeof(int)));
  
  
          dt.Columns.Add(new DataColumn(&quot;house&quot;, typeof(String)));
          dt.Columns.Add(new DataColumn(&quot;id&quot;, typeof(String)));
  
  
          //1. row gets skipped
  
          string line = sr.ReadLine();
          Console.WriteLine(&quot;line contains:&quot; + line);
          line = sr.ReadLine();
  
  
          do
          {
  
              string[] itemArray = line.Split(';');
              DataRow row = dt.NewRow();
  
              row.ItemArray = itemArray; //doesnt work and throws ArgumentException    
  
              itemArray.CopyTo(row.ItemArray, 0); //doesnt work either
  
              for (int i = 0; i &lt; 14; i++) //also doesnt work and leaves it empty
              {
                  row.ItemArray[i] = itemArray[i];
  
                  Console.WriteLine(row.ItemArray[i]);
              }
  
  
     
  
              row[&quot;id&quot;] = Guid.NewGuid().ToString();
              row[&quot;house&quot;] = &quot;&quot;;
  
              dt.Rows.Add(row);
  
  
              line = sr.ReadLine();
          } while (!string.IsNullOrEmpty(line));
  </code></pre>
  <p><strong>ReadFileIntoDb</strong> gets the content of a csv file as a parameter. Right now i reduced the csv content to only two lines which of one is just the header. The content looks like this and gets parsed successfully into <strong>var sr</strong>:
  <em>Bewohner;1102284;1102284;42600;ASG ROT;Menü (Inklusivleistung);01.07.2022;0;1;;;;;2000003</em></p>
  <p>As you can see this file contains 14 elements, some of which are empty. My DataTable also contains 14 columns and 2 additional which I set inside the code however and their values do not come from the csv.
  After performing the database operations my tables remain empty because I believe that row.ItemArray always remains empty so nothing gets added to the database. But I don't understand why it stays empty and why i get a ArgumentException. The source array itemArray is NOT empty and is also of length 14. So why does the exception get thrown if row.ItemArray is bigger in length? It has 16.</p>