I've a base type from which 3 different objects are inherited. Lets call the base object B, and inherited ones X, Y, and Z. Now I've dictionaries with an int as key and respectively X, Y, Z as value.
I've a control that will need to do lookups in one and only one of the specific dictionaries to draw itself but to be able to work with all three of my dictionaries I tried specifying that the control should take an argument equal to Dictionary<int, B>
. That didn't work though.
So what are my options? I want my control to work with all dictionaries of the form <int, B>
.