Santiago,
Searching on Groups.google.com
Generic types are typesafe to the type they are bound to.
From the draft of the ECMA spec:
<quote>
No special conversions exist between constructed reference types other
than those described in §15. In particular, unlike array types,
constructed reference types do not exhibit "co-variant" conversions.
This means that a type List<B> has no conversion (either implicit or
explicit) to List<A> even if B is derived from A. Likewise, no
conversion exists from List<B> to List<object>.
[Note: The rationale for this is simple: if a conversion to List<A> is
permitted, then apparently, one can store values of type A into the
list. However, this would break the invariant that every object in a
list of type List<B> is always a value of type B, or else unexpected
failures can occur when assigning into collection classes. end note]
</quote>
So you're right - no casting between generics.
--
Dave Cline
www.davecline.com/
davecline@...