I have a hash table which can contain any number of objects. All of these objects implement some similar methods / properties and some of their own.
For example all objects in the hashtable may have a method called PrintText taking a single parameter of type string. All the objects are however instantiated from different classes.
Is it possible for me to pull out a particular object from the hashtable by its key without knowing its type before runtime, and access all its own methods and properties (not just the common ones)?
Normally I would do something like,
MyClass TheObject = MyHashTable[Key];
But the object being pulled out could be derived from any class so I cannot do that in this instance.