System.RuntimeType ???!?!!! (&Hashtable)

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I load a type throught method such as
Assembly.GetType(typeName)
and I put it into a hastable, as a key

later on I *try* retrieve some information from this table with code like
PropertyInfo pi;
myhashtable[pi.PropertyInfo]

unfortunately this doesnt retrieve the value ?!?!?!

looking step by step in the debugger I see the following weird thing.
my hashtable doesn't have tyhe proper key but a simple wrapper over the type
of type
System.RuntimeType

any idea of what's going on ? and how to avoid it ?
 
Lloyd Dupont said:
I load a type throught method such as
Assembly.GetType(typeName)
and I put it into a hastable, as a key

later on I *try* retrieve some information from this table with code like
PropertyInfo pi;
myhashtable[pi.PropertyInfo]

unfortunately this doesnt retrieve the value ?!?!?!

looking step by step in the debugger I see the following weird thing.
my hashtable doesn't have tyhe proper key but a simple wrapper over the type
of type System.RuntimeType

any idea of what's going on ? and how to avoid it ?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Back
Top