Hi,
Below method is used to convert Array into DataTable. All you have to use LoadDataRow() method of DataTable to convert Array to DataTable.
Lets see the method.
The code example is based on C#.
public
static DataTable GetDataTableFromArray(object[] array){
DataTable dataTable = new DataTable();dataTable.LoadDataRow(array,
true);//Pass array object to LoadDataRow methodreturn dataTable;}
VB.Net Example
Public Shared Function GetDataTableFromArray(ByVal array As Object()) As DataTable
Dim dataTable As New DataTable()dataTable.LoadDataRow(array,
True)'Pass array object to LoadDataRow method Return dataTableEnd Function
Cheers
Pankaj