factory(alias mod)(stringclassname);| mod | symbol representing the module that the class is in |
stringclassname | string representing the name of the class |
Example
module foo.bar;class C{this() { x = 10; }int x;}void main(){auto c =cast(C)factory!(foo.bar)("C");assert(c !isnull && c.x == 10);}