TypeExtensions.GetAllSubClassesOf(Type, Assembly[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a list of types for all classes that extend from the current type and are not abstract
public static System.Collections.Generic.List<Type> GetAllSubClassesOf (this Type rootType, System.Reflection.Assembly[] searchAssemblies = default);
static member GetAllSubClassesOf : Type * System.Reflection.Assembly[] -> System.Collections.Generic.List<Type>
<Extension()>
Public Function GetAllSubClassesOf (rootType As Type, Optional searchAssemblies As Assembly() = Nothing) As List(Of Type)
Parameters
- rootType
- Type
The class type from which to search for inherited classes
- searchAssemblies
- Assembly[]
List of assemblies to search through for types. If null, default is to grab all assemblies in current app domain
Returns
Null if rootType is not a class, otherwise returns list of types for sub-classes of rootType