CommonEngineReadFileAsDT Method (Type, String, Int32) |
Used to read a file as a DataTable without instantiating the engine.
This method has limited features. We recommend using the non static methods.
Namespace:
FileHelpers
Assembly:
FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntaxpublic static DataTable ReadFileAsDT(
Type recordClass,
string fileName,
int maxRecords
)
Public Shared Function ReadFileAsDT (
recordClass As Type,
fileName As String,
maxRecords As Integer
) As DataTable
Parameters
- recordClass
- Type: SystemType
The record class. - fileName
- Type: SystemString
The file name - maxRecords
- Type: SystemInt32
The max number of records to read. Int32.MaxValue or -1 to read all records.
Return Value
Type:
DataTableThe DataTable representing all the read records.
See Also