[Mono-list] Instantiating all classes from a namespace

Esdras Beleza linux at esdrasbeleza.com
Mon Sep 29 16:46:21 EDT 2008


Hi, folks.

I'm programming an application and I want to divide its functionalities into
modules. I put them into some classes that belong to a namespace
App.Modules. Each module has a property (an attribute) "Name". 

I want to create a list of all modules dinamically, creating an instance of
each class in App.Modules (probably using foreach) and doing something like
System.Console.Writeline(SomeModule.GetName()).

The question is: how can I iterate inside a namespace classlist, and create
a new instance of each class of it?


Thanks in advance,


Esdras Beleza
-- 
View this message in context: http://www.nabble.com/Instantiating-all-classes-from-a-namespace-tp19731410p19731410.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list