title: How can you loop over the properties of a class?
body: <p>Is there a way in c# to loop over the properties of a class?</p>
  
  <p>Basically I have a class that contains a large number of property's (it basically holds the results of a large database query).
  I need to output these results as a CSV file so need to append each value to a string.</p>
  
  <p>The obvious way it to manually append each value to a string, but is there a way to effectively loop over the results object and add the value for each property in turn?</p>