title: String.Split to DataRow or DataTable.Row.Add
body: <p>I have one question here regarding the String.Split to create a DataRow or specifically adding data to row in DataTable. Let say I have this:</p>
  
  <pre><code>Dim dt As New DataTable
  Dim str As String = "Data1,Data2,Data3,Data4"
  </code></pre>
  
  <p>And I wanted to get the data from String <strong>str</strong> into the DataTable <strong>dt</strong>, split by <em>","</em> .</p>
  
  <p>Traditionally, I achieve this by using <em>String.Split</em> and this is how I do it:</p>
  
  <pre><code>Dim temp() As String = str.Split(",")
  
  Dim dr As DataRow = dt.NewRow
  dr("Col1") = temp(0)
  dr("Col2") = temp(1)
  dr("Col3") = temp(2)
  dr("Col4") = temp(3)
  dt.Rows.Add(dr)
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>dt.Rows.Add(temp(0), temp(1), temp(2), temp(3))
  </code></pre>
  
  <p>This should be fine if it involve only few columns of data. What if I have like 50 columns of DataTable or even more.
  Is there are any steps that I could directly assign String.Split to the DataRow or DataTable.Rows.
  Or other method that can help me to insert the data from a String into my DataTable.</p>
  
  <p>I am so sorry if any of you were unable to understand my English. Please comment for anything that was unclear and I really need guide into this as I am new to this programming world.</p>
  
  <p>Thank you.</p>