title: Defining method taking an IEnumerable - type constraint or base class?
body: <p>I asked a question earlier with regards to <a href="https://stackoverflow.com/questions/48502191/define-method-with-constrained-type-generic-vs-using-base-type">using generic vs base class in a method taking in a <code>List&lt;T&gt;</code></a>. It was quickly pointed out that you can't pass a <code>List&lt;Derived&gt;</code> into a method expecting a <code>List&lt;Base&gt;</code>.</p>
  
  <p>Further exploration (along with helpful links such as <a href="https://stackoverflow.com/q/4652858/100534">this one</a>) show that while you can't pass <code>List&lt;Derived&gt;</code> to <code>List&lt;Base&gt;</code>, you <em>can</em> pass <code>List&lt;Derived&gt;</code> to <code>IEnumerable&lt;Base&gt;</code> (due to contravariance/covariance in .NET 4).</p>
  
  <p>So like in my previous question, I present the same one here: Since there doesn't appear to be a difference in using these two options, which would be better? Is it strictly a style-based thing, or are there implications to using one over the other?</p>
  
  <p>Option A: <code>void DoWork&lt;TBase&gt;(IEnumerable&lt;TBase&gt; objs) where TBase : Base;</code></p>
  
  <p>Option B: <code>void DoWork(IEnumerable&lt;Base&gt; objs);</code></p>