title: Passing dynamic object to C# method changes return type
body: <p>I created a <a href="http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject(v=vs.110).aspx">class that inherits <code>DynamicObject</code></a> and want to create a static method that can create new instances with pre-determined properties (stored in the <code>Dictionary</code>).</p>
  
  <pre><code>public class CustomDynamic : DynamicObject
  {
      protected Dictionary&lt;string, object&gt; InnerDictionary;
  
      public static T Create&lt;T&gt;(Dictionary&lt;string, object&gt; dictionary) where T : CustomDynamic , new()
      {
          return new T
          {
              InnerDictionary = dictionary
          };
      }
  }
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>dynamic d = new Dictionary&lt;string, object&gt;();
  
  var realPlayer = CustomDynamic.Create&lt;Player&gt;(d as Dictionary&lt;string, object&gt;);
  var dynaPlayer = CustomDynamic.Create&lt;Player&gt;(d);
  
  realPlayer // Player type according to VS2013
  dynaPlayer // dynamic type according to VS2013
  </code></pre>
  
  <p>Since there is only one method signature, why does passing in a dynamic return a dynamic object? Or is actually just Visual Studio 2013 getting confused? </p>