title: How to loop through the properties of a Class?
body: <p>I have found that this question is quite common, but i didn't found what i am looking for. Maybe 'cause i want to do something else.</p>
  
  <p>So i am currently coding for a webcrawler and need to compare objects in a list.
  What i want to do ist loop through the list, find duplicates, and when i found duplicates merge these.</p>
  
  <p>When merging i want to: <br/> 
   - keep the information of the latest/most up to date object. <br/> 
   - if a field of the latest object is empty, take the value of the old objects field</p>
  
  <p>I thought looping through the properties of the two objects would be the easiest.</p>
  
  <p>I've tried a lot of things using reflection, all i could achieve was to show the property names of a class. What i want though is their values.</p>
  
  <p>If possible, i would use a loop like this:</p>
  
  <pre><code>foreach(property prop in myObject)
  {
      string value = myObject.prop;
      //do something
  }
  </code></pre>
  
  <p>Is that possible? Or am i missing something?</p>