Hi, i have some sort of Factory class which creates an instance of another class like so:

Code:
public object setDispatcher ( string obj )
{
	this.dispatcher = Activator.CreateInstance(Type.GetType(obj));
	return this.dispatcher;
}

//This is how i use the method
object disp = setDispatcher ( "MyClass" );
As parameter i gave the name of the Class which i want to instantiate. It works this far, because the constructor is called of the dynamically created class.

The instance of "MyClass" is now stored in the variable 'disp', but obviously i can't just do this:

disp.aMethod();

Because the compiler doesn't know what class i want to have and what methods it has. So there must be some other way to call the methods??

Anyone any advice on this??