My tool receives several information units from a server. For each unit there is a task item created in Outlook and also an information object that holds some specific information for each unit. both objects (task item (key) and info object (value)) are then stored in a hashtable to ensure a connection between them. also the created task items are displayed in outlook.
if the user selects one of the created task items and executes a particular function my goal is to find the selected task item in the hashtable and get the related information object this way.
the problem is, that the task item could not be found in the hashtable. I check things out and noticed that, at some point, the hashcode of the selected taskitem changed so that it is different from its origin hashcode in the hashtable task item object. therefore the hashtable.contains function fails
I can't explain myself when and WHY this hashcode value changes In the meantime between creating the task item and looking up for it there are no changes made....
I'm using VSTO, Visual Studio 2005 and Outlook 2007
Can you help me Thanks