S
sfdev2000
I created a generic collection class that is derived from dictionary.
I create an instance of this class to hold objects of a specific
class.
What I want to do is make it optional for an instance of my generic
class to be sorted, and so I'm trying to figure out if there is any
way to make my generic collection class work with dictionary or
sorteddictionary based on what constructor I call for my generic
collection class (or any other way to achieve the same result).
class foo : dictionary
{
}
I want to be able to create an instance of foo that is either based on
"sorteddictionary" or "dictionary" depending upon what type of object
(class) I want to store in it.
Is this at all possible?
I create an instance of this class to hold objects of a specific
class.
What I want to do is make it optional for an instance of my generic
class to be sorted, and so I'm trying to figure out if there is any
way to make my generic collection class work with dictionary or
sorteddictionary based on what constructor I call for my generic
collection class (or any other way to achieve the same result).
class foo : dictionary
{
}
I want to be able to create an instance of foo that is either based on
"sorteddictionary" or "dictionary" depending upon what type of object
(class) I want to store in it.
Is this at all possible?