Click or drag to resize

CommonEngineRecordsToDataTable Method (ICollection, Type)

Converts any collection of records to a DataTable using reflection. If the number of records is 0 this methods returns an empty DataTable with the columns based on the fields of the Type.

Namespace:  FileHelpers
Assembly:  FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntax
public static DataTable RecordsToDataTable(
	ICollection records,
	Type recordType
)

Parameters

records
Type: System.CollectionsICollection
The records to be converted to a DataTable
recordType
Type: SystemType
The type of the inner records.

Return Value

Type: DataTable
The DataTable containing the records as DataRows
See Also