title: Call dynamic method from string
body: <p>I'm trying to call a method from a dynamic without knowing its name. I have difficulties to explain this in english so there's the code:</p>
  
  <pre><code>public void CallMethod(dynamic d, string n)
  {
      // Here I want to call the method named n in the dynamic d
  }
  </code></pre>
  
  <p>I want something like:<code>d.n()</code> but with <em>n</em> replaced by the string.</p>
  
  <p>I want this :</p>
  
  <pre><code>Type thisType = this.GetType();
  MethodInfo theMethod = thisType.GetMethod(TheCommandString);
  theMethod.Invoke(this, userParameters);
  </code></pre>
  
  <p>but with <strong>dynamic</strong>.</p>
  
  <p>If you need the context to help you: I'm make an application that's support "mods", you put DLLs in the mod folder and it loads it and execute it. It works with <strong>dynamic</strong> (I have a dictionnary like this : <code>Dictionnary&lt;string, dynamic&gt; instances;</code>). I want the application to get the methods name from the library (with <code>instances["topkek"].GetMethods();</code>, I've already made this method) but then call the method with the string it returns. I don't know if what I said mean something (I'm french :/ )...</p>
  
  <p>I'm using VS 2013 Express with the .Net framework 4.5, if you need more information to help me ask me.</p>