static class ReflectionHelper { public static the IEnumerable <T> CreateAllInstancesOf <T> () { return typeof (ReflectionHelper) .Assembly.GetTypes () // Get the current library of all types .Where (T => typeof (T) .IsAssignableFrom ( t)) // Get all types of indirect or direct succession t .Where (t =>! && t.IsAbstract t.IsClass) // Get exclude non-abstract class interface inheritance .Select (t => (T) Activator.CreateInstance (t)); // create instance, and returns the result (the project requirements, delete) } }