title: Dynamic to Custom C# Object
body: <p>I am trying to convert dynamic object contains JSON data into custom c# object and get the following error:</p>
  
  <blockquote>
    <p>RuntimeBinderException The best overloaded method match for
    Newtonsoft.Json.JsonConvert.DeserializeObject(string, System.Type,
    params Newtonsoft.Json.JsonConverter[])' has some invalid arguments</p>
  </blockquote>
  
  <p>The variable named <code>communication</code> is a <code>dynamic</code> object contains the following value (JSON data):</p>
  
  <pre><code>{
    "name": "inGame",
    "selected": true,
    "image": "assets/img/communication/ingame.png"
  }
  </code></pre>
  
  <p>here is the code that should convert the dynamic into a custom c# object:</p>
  
  <pre><code>InGameCommunication  inherited = JsonConvert.DeserializeObject(communication, typeof(InGameCommunication),
                                                            new JsonSerializerSettings());
  </code></pre>
  
  <p><strong>The class hierarchy:</strong></p>
  
  <pre><code>public abstract class Communication
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public bool Selected { get; set; }
  }
  
  public class InGameCommunication : Communication
      {
      }
  
  public class SkypeCommunication : Communication
  {
      public string Username { get; set; }
  }
  </code></pre>