title: How to determine if type is a base class of an abstract class
body: <p>To check if my type was the interface type I was using the following method</p>
  
  <pre><code>dllFileNames = Directory.GetFiles(path, "*.dll");
  
  ICollection&lt;Assembly&gt; assemblies = new List&lt;Assembly&gt;(dllFileNames.Length);
  foreach (string dllFile in dllFileNames)
  {
      AssemblyName an = AssemblyName.GetAssemblyName(dllFile);
      Assembly assembly = Assembly.Load(an);
      assemblies.Add(assembly);
  }
  
  Type pluginType = typeof(T);
  foreach (Assembly assembly in assemblies)
  {
      if (assembly != null)
      {
          try
          {
              Type[] types = assembly.GetTypes();
  
              foreach (Type type in types)
              {
                  if (type.IsInterface || type.IsAbstract)
                  {
                      continue;
                  }
                  else
                  {
                      if (type.GetInterface(pluginType.FullName) != null &amp;&amp; typeof(IBase).IsAssignableFrom(type))
                      {
                          pluginTypes.Add(type);
                      }
                  }
              }
          }
          catch (Exception ex) { }
      }
  }
  </code></pre>
  
  <p>However <code>IsAssignableFrom</code> is false now that I changed <code>IBase</code> to an abstract class.  </p>
  
  <p>How do I do the same thing but for a base type of an abstract class?</p>
  
  <p><strong>EDIT:</strong>
  Yes my class inherits from the abstract class for sure</p>
  
  <pre><code>public class MyType : IBase{  ...   }
  </code></pre>
  
  <p>where</p>
  
  <p>IBase is now</p>
  
  <pre><code>public abstract class IBase{   ...   }
  </code></pre>
  
  <p>and before it used to be</p>
  
  <pre><code>public interface IBase{ ...  }
  </code></pre>
  
  <p><strong>EDIT2</strong>: unfortunately I could not recreate the issue with the following code, (both results are true)</p>
  
  <pre><code>    public abstract class IBlah
      {
          string test { get; set; }
      }
  
      public class implementation1 : IBlah
      {
      }
  
      public interface IBlech
      {
          string test { get; set; }
      }
  
      public class implementation2 : IBlech
      {
          public string test
          {
              get
              {
                  throw new NotImplementedException();
              }
  
              set
              {
                  throw new NotImplementedException();
              }
          }
      }
  
  
      static void Main(string[] args)
      {
  
          try
          {
              bool result1 = (typeof(IBlah).IsAssignableFrom(typeof(implementation1)));
              bool result2 = (typeof(IBlech).IsAssignableFrom(typeof(implementation2)));
          }
          catch (System.Exception ex)
          {
              Console.WriteLine(ex.ToString());
              Console.ReadKey();
          }
  
      }
  </code></pre>