Skip to content

Instantly share code, notes, and snippets.

@lmatt-bit
Created April 9, 2014 11:25
Show Gist options
  • Select an option

  • Save lmatt-bit/10257251 to your computer and use it in GitHub Desktop.

Select an option

Save lmatt-bit/10257251 to your computer and use it in GitHub Desktop.
Find derived types for a type
public static IEnumerable<Type> FindDerivedInterfaceTypes(Type type)
{
return System.Reflection.Assembly.GetAssembly(type).GetTypes().Where(t => t.GetInterfaces().Contains(type));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment