FixedWidth is an easy to use .NET library I created for working with fixed width (flat formatted) text files. By applying attributes to your code, you can setup the position and format for your data when deserializing/serializing to and from fixed width files.

Features – what can it do?

  • Serialize an object into a string and deserialize a string into an object
  • Supports most built-in types
  • Supports custom serialization and deserialization via ITextFormatter
  • Specify field padding and text alignment
  • Handles zero and one based indexes

Check out the project on GitHub or download via NuGet.

  • Unit Tested
  • Documentation available on GitHub project Wiki