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

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 06/25/04


Date: Fri, 25 Jun 2004 08:25:08 +0100

Lloyd Dupont <ld@NewsAccount.galador.net> wrote:
> 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.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too