Better way to convert a hashtable to datatable
<p>Is there any better way of converting a hashtable to datatable</p>

<pre><code>private DataTable ConvertHastTableToDataTable(System.Collections.Hashtable hashtable)
{

   var dataTable = new DataTable(hashtable.GetType().Name);
    dataTable.Columns.Add("Key",typeof(object));
    dataTable.Columns.Add("Value", typeof(object));
    IDictionaryEnumerator enumerator = hashtable.GetEnumerator();
    while (enumerator.MoveNext())
    {
     dataTable.Rows.Add(enumerator.Key, enumerator.Value);

    }
    return dataTable;
}
</code></pre>
