title: Convert list of string to DataTable
body: <p>I want to convert List of string to datatable so I try:</p>
  
  <pre><code>List&lt;string&gt; DesignNameList = new List&lt;string&gt;();
  
    public static Mymethod...{
  
       parameters = ToDataTable(DesignNameList);
     }
  
  
   public static DataTable ToDataTable(List&lt;string&gt; list)
          {
  
              DataTable dataTable = new DataTable();
              foreach (var row in list)
              {
                  dataTable.Rows.Add(row);
              }
              return dataTable;
  
          }
  </code></pre>
  
  <p>But I get error when foreach is being executed in line <code>dataTable.Rows.Add(row);</code>:</p>
  
  <blockquote>
    <p>'Input array is longer than the number of columns in this table.'</p>
  </blockquote>
  
  <p>What I'm doing wrong? Regards</p>