title: Finding out if a type implements a generic interface
body: <p>Let's say I have a type, MyType. I want to do the following:</p>
  
  <ol>
  <li>Find out if MyType implements the IList interface, for some T.</li>
  <li>If the answer to (1) is yes, find out what T is.</li>
  </ol>
  
  <p>It seems like the way to do this is GetInterface(), but that only lets you search by a specific name. Is there a way to search for "all interfaces that are of the form IList" (If possible it woudl also be useful if it worked if the interface was a subinterface of IList.)</p>
  
  <p>Related: <a href="https://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type">How to determine if a type implements a specific generic interface type</a></p>