title: Getting an object from a dictionary of objects
body: <p>I'm trying to pull an object from a dictionary of objects, and return said object however I'm having a bit of a problem with types. The class in question looks something like this, I'm wondering how I go about returning the actual object rather than the variable (which I assume is a string by default).</p>
  
  <pre><code> public Object GetObject(string foo){
  
   if(someDict.ContainsKey(foo))
   {
     var pulledObject = someDict[foo];
  
   }
    return pulledObject;
   }
  </code></pre>
  
  <p>I had thought boxing was needed, something like</p>
  
  <pre><code> object pulledObject = someDict[foo];
  </code></pre>
  
  <p>But that doesn't seem to work, any advice that could point me in the right direction.</p>