CommonEngineRecordsToDataTable Method (ICollection) |
Converts any collection of records to a DataTable using reflection.
WARNING: this methods returns null if the number of records is 0,
pass the Type of the records to get an empty DataTable.
Namespace:
FileHelpers
Assembly:
FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntaxpublic static DataTable RecordsToDataTable(
ICollection records
)
Public Shared Function RecordsToDataTable (
records As ICollection
) As DataTable
Parameters
- records
- Type: System.CollectionsICollection
The records to be converted to a DataTable
Return Value
Type:
DataTableThe DataTable containing the records as DataRows
See Also