title: Copy C# DataTable and convert all values to string
body: <p>I have a <code>DataTable</code> with columns of different types. What I want is a <code>DataTable</code> that has the same column names but all values are strings. That is, if this is the first:</p>
  
  <pre><code>Name   Age
  -----------
  John   31
  Alice  27
  Marge  45
  </code></pre>
  
  <p>where Name is a <code>String</code> column and Age is an <code>Int32</code> column, what I want is:</p>
  
  <pre><code>Name   Age
  -----------
  John   31
  Alice  27
  Marge  45
  </code></pre>
  
  <p>where Name and Age are <em>both</em> string columns. The output table must contain the same values as the input table but every value must be converted to a string. Can anyone provide any insight on how one might go about doing this? I thought about maybe doing something like</p>
  
  <pre><code>foreach (DataColumn col in inputTable.Columns)
  {
      outputTable.Columns.Add(col.ColumnName, typeof(string));
  
      foreach (DataRow row in inputTable.Rows)
      {
          ...??
      }
  }
  </code></pre>
  
  <p>Or perhaps there is a better or more efficient approach? Any guidance would be greatly appreciated.</p>