Jey J

Jey J

  • NA
  • 1
  • 0

HashTable Enumeration Issue

Jan 21 2007 8:53 PM
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)