Amazon Wish List News RSS feed. Development Blog Browse the Forums  
  Overview - Downloads - Examples - News Feed - Contact Info -

CommonEngine.RecordsToDataTable Method (ICollection, Type, Int32)

Converts any collection of records to a DataTebla 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.

[Visual Basic]
Overloads Public Shared Function RecordsToDataTable( _
   ByVal records As ICollection, _
   ByVal recordType As Type, _
   ByVal maxRecords As Integer _
) As DataTable
[C#]
public static DataTable RecordsToDataTable(
   ICollection records,
   Type recordType,
   int maxRecords
);

Parameters

records
The records to be converted to a DataTable
recordType
The type of the inner records.
maxRecords
The max number of records to add to the datatable. -1 for all.

Return Value

The datatable containing the records as DataRows

See Also

CommonEngine Class | FileHelpers Namespace | CommonEngine.RecordsToDataTable Overload List


Powered by:

Source Forge Thanks Jetbrains for support us !! Thanks BB Software for support us !! TestDriven.NET Code Coverage by Clover.NET Code Project Article Larkware News Sharp Toolbox