Click button to edit
Converters: Custom Converter
Explains how to extend the library with a new converter
For fixed length records where you need to read decimal data and you don't have an explicit decimal dot (because this isn't required or a Cobol layout). You read it with a customer converter.
If you want to parse a file with a field that has different parsing rules you can define a CustomConverter.For example, if you have the following source file:
Input.txt
RecordClass.cs
The last step is to define the converter, you must inherit from ConverterBase:
MoneyConverter.cs
Done !! You actually parse the file with:
RunEngine.cs
Console
Product 125 price 145,88
Product 126 price 1234,56
Product 127 price 12345,67
Product 128 price 8765,43