title: Static methods from abstract class
body: <p>I know similar questions have been asked often enough on here but I've been searching for a while for something that deals with the issue I'm having.</p>
  
  <p>I'm building an application and had three separate classes for 'Team', 'Manager' and 'Employee'. I realised that I was repeating a lot of code for all three so I defined an abstract class called 'Worker'.</p>
  
  <p>On each of the classes I've defined a <code>GetAllX</code> method that returns and <code>IEnumerable&lt;X&gt;</code>, for example:</p>
  
  <pre><code>public static IEnumerable&lt;Manager&gt; GetAllManagers()
  {
      //Code to get all managers
      yield return m
      //find next manager and loop
  }
  </code></pre>
  
  <p>What I want is to be able to define a method in my abstract class called <code>GetAll</code> which will return an IEnumerable of type T where T is the class inheriting from my abstract class. Is there any way to achieve something like this? </p>