Which Design Pattern?

Having a bit of a brain fail.

Suppose I have two classes subclassed off one other class. These two classes also inherit from an interface.

I want to pass an instance of one of these classes to a new window via a constructor and store it as a property for use by the window.

If I create a property with the type of the super I can’t store these classes , if I use the type of one of the classes I can’t store the other (obviously!!). If I use the interface I lose the subclassed properties.

Hope I’ve explained ok - I think there’s a design pattern I can use but for the life of me can’t remember which!

Any pointers out there?

That’s the correct way to do it.

Why not? This should work.

DOH - I’d simply set things up wrong!

The super should have had the properties and interface set - the subclasses just inherit from the super. I’d set the subclasses to use the interface… Move along, nothing to see here!

Something tells me I need a break after 12 hours solid!

Just go another eight and you may take a break. Of five minutes.

… and you’ll be in the flow state. Then suddenly you will not make any mistakes anymore.