.net - invoke methods from classes from a certain namespace via reflection
Posted
by Kristian Hildebrandt
on Stack Overflow
See other posts from Stack Overflow
or by Kristian Hildebrandt
Published on 2010-03-14T16:45:40Z
Indexed on
2010/03/14
16:55 UTC
Read the original article
Hit count: 179
SPL and PHP allows you to create objects on the fly from classes, that fulfill certain conditions, such as implementing certain interfaces and stuff like that.
However, I would like to do something similar in c# and automatically create objects from all classes in a namespace and invoke a particular method from those classes that implement a certain interface.
My experience developing desktop apps is very limited. I am not quite sure if I should use delegates to archive this or if reflection is really the way to go.
© Stack Overflow or respective owner