title: Generic Class Inheritence and LINQ Extension Methods
body: <p>Let's say I have a generic class looking something like this</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class GenericCollection&lt;T&gt; : Collection&lt;T&gt;, IQueryable&lt;T&gt;
  {
      public string SomeCollectionProperty { get; set; }
  
      ...
      // IQueryable implentations
  }
  </code></pre>
  
  <p>now I have a child classes of the above parent class </p>
  
  <pre class="lang-cs prettyprint-override"><code>public class SomeCollection : GenericCollection&lt;SomeType&gt;
  {
      // Some Additional Functionality here
  }
  </code></pre>
  
  <p>Within the generic class I have the full use of the LINQ Extension methods (ex Where, First, Select etc)</p>
  
  <p>As soon as I try to access the LINQ Extension methods in my derived class it seems to forget that it is IQueryable or IEnumerable</p>
  
  <p>I would expect it to do something like this (inside SomeCollection)</p>
  
  <pre class="lang-cs prettyprint-override"><code>public SomeType FindFirst(int SomeProperty)
  {
      return this.First(t =&gt; t.someproperty == SomeProperty);
  }
  </code></pre>
  
  <p>but instead when I hit the . after this visual studio doesn't give me any of the extension methods</p>
  
  <p>I'm wracking my brain trying to understand why</p>
  
  <p>Especially since if In my Generic class I  just inherit from <code>Collection&lt;T&gt;</code> which implements <code>IEnumerable&lt;T&gt;</code> which has LINQ Extension methods associated with it I can still use the LINQ Extension methods in my generic class but as soon as I define a strongly typed class based on my generic class I loose the LINQ Extension methods</p>
  
  <p>I hope I didn't just confuse everyone because I sure feel like I'm confused</p>