I'm working on some kind of scheduler, who gets the name of a class out of the DB and then executes a method of that class.
The problem is, that I can't get the reference to the class.
What I basically want:
using MyNameSpace;
...
Type myType = Type.GetType("MyNameSpace.MyClass");
myInterface myObject = (myInterface)Activator.CreateInstance(myType);
myObject.Run();
I know I need the assembly name so I tried something like this:
Type myType = typeof(object).Assembly.GetType("MyNameSpace.MyClass");
But the type is always null.
The wanted class lies in the same solution but in an other project. How can I get the referencee, so that I can execute the run() method?
thx