title: Is it possible in C# to restrict method parameter to an class that inherits from another class?
body: <p>Can you make a method that requires that a parameter inherits from another?</p>
  
  <p>Say I am writing an external library class.</p>
  
  <pre><code>abstract class ImTheBaseClass
  {
  public int Age {get;set;}
  }
  
  class Does : ImTheBaseClass
  {}
  
  class AlsoDoes : ImTheBaseClass
  
  class DoesNot
  {}
  </code></pre>
  
  <p>Can I write a method that accepts Does and AlsoDoes (Or any number of permutations) as a parameter but rejects DoesNot (at compile time, not run time)?</p>