title: Argument type is not assignable to parameter type and it should be
body: <p>I have defined a class <code>CommandProcessor&lt;T&gt;</code> as having <code>T</code> derive from <code>Command</code> and contain a default constructor:</p>
  
  <pre><code>public class CommandProcessor&lt;T&gt; : ICommandProcessor&lt;T&gt; where T : Command, new()
  </code></pre>
  
  <p>The <code>Command</code> type itself also defines a default constructor and it implements an interface, <code>ICommand</code>. The interface contains a method that expects an input parameter to be of type <code>T</code>:</p>
  
  <pre><code>void Process(T command);
  </code></pre>
  
  <p>So I expect that I am able to define a class:</p>
  
  <pre><code>public class SpecificCommandProcessor : CommandProcessor&lt;SpecificCommand&gt;
  </code></pre>
  
  <p>it will work because <code>SpecificCommand</code> inherits from <code>Command</code> and also provides a default constructor.</p>
  
  <p>All good so far.</p>
  
  <p>But Visual Studio 2013 with C# 4.5 won't compile the following line:</p>
  
  <pre><code>CommandProcessor&lt;Command&gt; test = new SpecificCommandProcessor();
  </code></pre>
  
  <p>saying that it cannot convert the source type to the target type.</p>
  
  <p>This means that I can also not do the following:</p>
  
  <pre><code>List&lt;CommandProcessor&lt;Command&gt;&gt; myList = new List&lt;CommandProcessor&lt;Command&gt;&gt;;
  var toAdd = new SpecificCommandProcessor();
  myList.Add(toAdd);
  </code></pre>
  
  <p>I have tried direct casting and safe casting, but none is accepted by the compiler. Yet it is obvious that <code>SpecificCommandProcessor</code> is in fact a <code>CommandProcessor&lt;Command&gt;</code>.</p>
  
  <p>What am I missing here?</p>