title: Loop to fill class properties?
body: <p>Let's say I have a Class Person with a bunch of properties (FirstName, LastName, Address, City, etc)</p>
  
  <p>I am pulling data to fill these properties from an Excel file (using the excellent EPPlus library) where each of the columns are identical to the Person properties, in the same order.</p>
  
  <p>Is there a way to iterate through all the properties in Class Person to fill them?</p>
  
  <p>Currently I am doing this:</p>
  
  <pre><code>person.FirstName= worksheet.Cells[2, 1].Text;
  person.LastName= worksheet.Cells[2, 2].Text;
  person.Address= worksheet.Cells[2, 3].Text;
  person.City= worksheet.Cells[2, 4].Text;
  person.Age= worksheet.Cells[2, 5].Text;
  //repeat for a dozen more properties
  </code></pre>
  
  <p>This seems rather inelegant. Is there some loop I can use?</p>