Some time we need to convert an Array to DataTable. Here is the solution to convert an existing array to a DataTable. This function will take Array object as an input and return you a DataTable.
The sample code is written in C#.
public static DataTable GetDataTableFromArray(object[] arrayObejct){
DataTable dataTable = new DataTable(); dataTable.LoadDataRow(arrayObejct,
true); return dataTable;}