FileHelperAsyncEngineTBeginReadStream Method |
Namespace: FileHelpers
[Missing <returns> documentation for "M:FileHelpers.FileHelperAsyncEngine`1.BeginReadStream(System.IO.TextReader)"]
This method only seeks to the first record.
To read record by record use ReadNext method.
When you stop reading the file you must call Close method.
using FileHelpers; // First declare the record class [Delimitedrecord("|")] public class SampleType { public string Field1; public int Field2; } public void ReadExample() { SampleType record; var engine = new FileHelperAsyncEngine<SampleType>(); using(engine.BeginReadFile("source.txt")) { foreach(var record in engine) { // put your code here !!!! Console.WriteLine("Data " + record.Field1 + " , " + record.Field2.ToString()); } } }