HashTable Enumeration Issue
Hi there,
I'm storing my custom objects in HashTable as values. When enumerating through them, Invalid cast exception:
Param test = null;
foreach (DictionaryEntry p in pHTParam)
{
test = (Param)p.Value; //the hashtable has Param objects as value. So, it's failing on casting saying - cannot convert //Param to Param!!
}
}
Unable to cast object of type 'Param' to type 'Param'.
Any help would be appreciated!!
Thanks,
JJ
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Scott LysleRank #49 · 31K reputationPosted Jan 22, 2007, 8:30 PM EST