System.ReflectionLibrary.GetSuperClasses C# (CSharp) Method

GetSuperClasses() public static method

public static GetSuperClasses ( Type type, bool allowAbstract = false, bool allowSelf = true ) : IEnumerable
type Type
allowAbstract bool
allowSelf bool
return IEnumerable
        public static IEnumerable<Type> GetSuperClasses(this Type type,
            bool allowAbstract = false, bool allowSelf = true)
            =>
                from assembly in AppDomain.CurrentDomain.GetAssemblies()
                from t in assembly.GetTypes()
                where t.IsAssignableFrom(type)
                      && t != typeof(object)
                      && (allowAbstract || (!t.IsAbstract && !t.IsInterface))
                      && (allowSelf || t != type)
                select t;