title: Chaining Extension methods in C#
body: <p>Is it possible to create an extension method that returns the instance that is invoking the extension method?</p>
  
  <p>I would like to have an extension method for anything that inherits from <code>ICollection&lt;T&gt;</code>, returns the object.  Much like how jQuery always returns the jquery object.</p>
  
  <pre><code>public static object AddItem&lt;T&gt;(this ICollection&lt;T&gt; collection, T itemToAdd)
  {
      collection.Add(itemToAdd);
      return collection;
  {
  </code></pre>
  
  <p>I imagine something like above, but I am not sure how to get back to the parent to the "this" object type for use of something like this:</p>
  
  <pre><code>List&lt;int&gt; myInts = new List&lt;int&gt;().AddItem(5);
  </code></pre>
  
  <p>EDIT: Just wanted to be clear that i was hoping for a single generic constraint solution.</p>