title: Json.Net acting up when adding a second constructor that takes a Color type arguemnt?
body: <p>I have a class that I serialize with Json.Net. I recently have needed to add a <code>Color</code> property to the class along with a nice way to set it in the constructor. </p>
  
  <pre><code>public class InfoClass
  {
      public static Color DefaultColor = Color.SlateBlue;
  
      public String Name { get; set; }
      public int Left { get; set; }
      public int Right { get; set; }
      public Color ColorId { get; set; }
  
      public InfoClass(String name, int left, int right)
      {
          Name = name;
          Left = left;
          Right = right;
          ColorId = DefaultColor;
      }
  
      public InfoClass(String name, int left, int right, Color colorId)
      {
          Name = name;
          Left = left;
          Right = right;
          ColorId = colorId;
      }
  }
  </code></pre>
  
  <p>I have found that once I add the second constructor I get a exception thrown (I am pretty sure as a result of deserializing this class) at my <code>Application.Run</code> in <code>Program.cs</code>. It is a <code>TargetInvocationException</code> with an inner exception of <code>NullReferenceException</code>. The inner exception also notes that the <code>Data</code> is <code>System.Collections.ListDictionaryInternal</code>, which I hold a <code>List&lt;InfoClass&gt;</code> within the class I am serializing. </p>
  
  <p><strong>Seeing as everything works prior to adding this constructor I have to assume that the error lies with it, though I am not sure why?</strong></p>
  
  <p>Just as a reference upon serialization of a <code>List&lt;InfoClass&gt;</code> Json.Net produces the following Json</p>
  
  <pre><code>"InfoList": [
  {
      "Name": "One",
      "Left": 1,
      "Right": 2,
      "ColorId": "SlateBlue"
  },
  {
      "Name": "Two",
      "Left": 3,
      "Right": 4,
      "ColorId": "SlateBlue"
  }]
  </code></pre>
  
  <p>I have also taken a look at <a href="https://stackoverflow.com/questions/27584530/json-net-serialization-of-system-drawing-color-with-typenamehandling">this SO answer</a> which talks about the proper way to serialize a <code>Color</code>. I have implemented this technique, along with simply saving the <code>Color</code> as its RGB values. All of these methods work to serialize the data, but I am still given the same exception upon deserialization. Though I do not get the error with these methods if the constructor does not exist. So I am thoroughly convinced it is this constructor (but I have been wrong before).</p>
  
  <p><strong>EDIT:</strong> After a moment of sudden clarity I put a try/catch around the deserialization call and found the exception returned the message</p>
  
  <blockquote>
    <p>Unable to find a constructor to use for type [InfoClass]. A class
    should either have a default constructor, one constructor with
    arguments or a constructor marked with the JsonConstructor attribute.</p>
  </blockquote>
  
  <p>I guess Json.Net does not like multiple constructors with no default or no marked ones.</p>