M
MFRASER
Ok I have a collection that inherits from the CollectionBase. Problem is
that I want a quick way to access the objects either by ID or Name.
I was thinking of creating two hashtables that are held privately by the
collection and when a user calls the following functions it would go to the
appropiate collection to locate it. My question is, is there a better way
to do this?
FindobjectbyID(int ID)
{
return HashID[ID];
}
FindobjectbyName(string Name)
{
return HashName[Name];
}
that I want a quick way to access the objects either by ID or Name.
I was thinking of creating two hashtables that are held privately by the
collection and when a user calls the following functions it would go to the
appropiate collection to locate it. My question is, is there a better way
to do this?
FindobjectbyID(int ID)
{
return HashID[ID];
}
FindobjectbyName(string Name)
{
return HashName[Name];
}