How do I access the interface implementations from an object?
interface IGraphicsObject
{
Draw();
Delete();
}
I create 3 classes: Square, Circle and Triangle, all implementing IGraphicsObject. Then I do something like
object Shape = Activator.CreateInstance("myShapes", "Square");
Then I want to be able to type:
Shape.Draw();
Shape.Delete();
etc.
How do I do that?