title: Copying a value (object) from a Dictionary of objects
body: <p>I'm going mad with value vs reference in relation to dictionaries.  </p>
  
  <p>How come when I do this:</p>
  
  <pre><code>Object obj = ObjDictionary[key];
  obj.intproperty ++;
  </code></pre>
  
  <p>C# increments the intproperty of the corresponding object in ObjDictionary as well as obj itself. This suggests to me the operation creates a reference rather than a copy of the Object but I can't find out how to copy the Object itself into a new one.</p>
  
  <p>This is causing all sorts of havoc for me as I try to create  new dictionaries from objects copied from the original dictionary.</p>
  
  <p>EDIT:</p>
  
  <p>I understand the dictionary does not contain objects, but references to objects. </p>
  
  <p>The problem I'm still having is how this line works.</p>
  
  <pre><code>Object obj = ObjDictionary[key];
  </code></pre>
  
  <p>How does it compile when obj is an Object and ObjDictionary[key] is a reference? Is this something C# does implicitly?</p>