Tag: polymorphism
-
C#: Instantiating a class of Unknown Type
The project I am currently working on has several dozen different types of Form classes, each of which is accessible from a common menu strip. Rather than repeatedly instantiating each of the forms from the menu item handlers, I wanted to funnel the request to a single function.
-
Breaking Java's Rules: Instantiating an Interface
Here’s a geeky party trick: