title: Reading data from Fixed Length File into class objects
body: <p>I have a fixed length file and would like to read its data into class objects. These objects will be further used to insert/update data in Database. Although it can be done with StreamReader, I am looking for a more sophisticated solution. FileHelper is another solution but I do not want to use an open source code in my program. Is there any other option?</p>
  
  <p>In the below link, one user has answered this similar question but it is not elaborated:</p>
  
  <p><a href="https://codereview.stackexchange.com/questions/27782/how-to-read-fixed-width-data-fields-in-net">https://codereview.stackexchange.com/questions/27782/how-to-read-fixed-width-data-fields-in-net</a></p>
  
  <p>I tried to implement this but I am unable to find Layout() Attribute.</p>
  
  <p>Thanks.</p>
  
  <p>Sample Fixed Length File:</p>
  
  <pre><code>aCSTDCECHEUR20140701201409161109 //Header of the file
  b0000000000050115844085700800422HB HERBOXAN-COMPACT WHITE 12,5L         0000002297P0000000184L0000000000 0000000000
  zCSTDCECH201409161109 148 //Footer of the file
  </code></pre>