If I'm using DictionaryBase derived object lists and I iterate through them
with the IDictionary interface can I still check the object type by calling
typeof()?
btw I'm is using .NET 1.1
Thanks,
Jim
ex.
bool FindSpectialItem(string key, DictionaryBase[] MyDictionaryArray)
{
foreach(IDictionary dict in MyDictionaryArray)
{
bool found = false;
DerivedDictionaryA derivedDict = new DerivedDictionaryA ();
if(dict is DerivedDictionaryA) //or if(derivedDict.GetType() ==
typeof(DerivedDictionaryA))
{
//found a certain type
//look for key
found = true
}
else
continue;
}
return found;
}