J Jacek Jurkowski Nov 8, 2007 #1 Reflect an assembly (current dll) and create instance object of every class which base clas is "Module"?
Reflect an assembly (current dll) and create instance object of every class which base clas is "Module"?
J Jacek Jurkowski Nov 8, 2007 #2 Another: How to create instance of an known Type? Type.GetInstance() - somethink like that ...
H Hans Kesting Nov 8, 2007 #3 Jacek Jurkowski laid this down on his screen : Another: How to create instance of an known Type? Type.GetInstance() - somethink like that ... Click to expand... that's Activator.CreateInstance(myType) and various overloads. Hans Kesting
Jacek Jurkowski laid this down on his screen : Another: How to create instance of an known Type? Type.GetInstance() - somethink like that ... Click to expand... that's Activator.CreateInstance(myType) and various overloads. Hans Kesting
A Andy Mueller Nov 8, 2007 #4 Jacek said: Reflect an assembly (current dll) and create instance object of every class which base clas is "Module"? Click to expand... Assembly ass = GetType().Assembly; foreach(Type tp in ass.GetTypes()) { if(!typeof(Module).IsAssignableFrom(tp)) continue; Module o = (Module)Activator.CreateInstance(tp, true); } HTH, Andy
Jacek said: Reflect an assembly (current dll) and create instance object of every class which base clas is "Module"? Click to expand... Assembly ass = GetType().Assembly; foreach(Type tp in ass.GetTypes()) { if(!typeof(Module).IsAssignableFrom(tp)) continue; Module o = (Module)Activator.CreateInstance(tp, true); } HTH, Andy