Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.21 KB

File metadata and controls

44 lines (31 loc) · 1.21 KB

EnumerableExtensions.ToDataTable method (1 of 2)

Creates a DataTable from an IEnumerable of object[] with the specified columns.

public static DataTable ToDataTable(this IEnumerable<object[]> src, DataColumn[] cols, 
    string name = "Default")
parameter description
src Source collection
cols Headers to use for the DataTable
name DataTable name (optional)

See Also


EnumerableExtensions.ToDataTable<T> method (2 of 2)

Creates a DataTable from an IEnumerable, optionnally overriding the column headers.

public static DataTable ToDataTable<T>(this IEnumerable<T> src, IList<string> headers = null, 
    string name = "Default")
parameter description
T Items type
src Source collection
headers Headers to use for the DataTable
name DataTable name (optional)

See Also