title: Disadvantages of generic types in C #
body: <p>I have repeatedly heard that generics in C# are less powerful than templates in C++. But I have not heard any arguments in favor of (or against) this. Is it really so, if so, in what it shows?</p>
  
  <p>I recently faced with the strange feature that if <code>SomeClassChild</code> is descendant of class <code>SomeClass</code>, then <code>List&lt;SomeClassChild&gt;</code> can not be converted to <code>List&lt;SomeClass&gt;</code>, whereas <code>SomeClassChild[]</code> to <code>SomeClass[]</code> - can.</p>
  
  <p>The following code will also result in an error:</p>
  
  <pre><code>List&lt;SomeClass&gt; lst = new List&lt;SomeClass&gt;();
  lst.Add(new SomeClassChild());
  </code></pre>