[Mono-list] Crazy generic dictionary?

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Sep 30 14:36:03 EDT 2007


On 9/29/07, Robert Jordan <robertj at gmx.net> wrote:
> class FooDictionary<T> : Dictionary<System.Type, T>
> {
>         public void Add (T t)
>         {
>                 this [typeof(T)] = t;
>         }
> }

Isn't typeof(T) always evaluated to T itself?

-- 
Felipe.


More information about the Mono-list mailing list