Using reflection (i'm guessing?), is it possible to create a method that will return a collection of all objects that inherit from an interface named IBlahblah?
public interface IBlahblah;
Using reflection (i'm guessing?), is it possible to create a method that will return a collection of all objects that inherit from an interface named IBlahblah?
public interface IBlahblah;
Yes, this is possible, this other stack overflow post gives the solution with LINQ.
Assuming you have an assembly (or a list of assemblies) to look in, you can get a collection of types which implement an interface:
You can't get a collection of "live objects" implementing the interface though - at least not without using the debugging/profiling API or something similar.
Do you mean something like this ?
Yes this is possible :
And this includes the types outside of the current assembly.