1
Answer

HashTable Enumeration Issue

Jey J

Jey J

17y
1.8k
1
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

Answers (1)