Re: Can a generic class re-create itself with another type
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Wed, 4 Jun 2008 09:38:10 -0700 (PDT)
On Jun 4, 5:25 pm, tadm...@xxxxxxxxx wrote:
<snip>
I have attacked this 10 different ways and haven't come up with
anything that works. That may be because it can't be done; has anyone
else attempted this successfully?
You can certainly create closed types (and then instances of them)
with reflection. Reflection with generic types isn't much fun, but
it's definitely doable. If you could provide a short but complete
program which attempts to *use* your SomeClass<T> (and verifies that
it behaves correctly) I'd be happy to have a go at implementing it.
(Unit tests would be even better than a short but complete program, of
course).
Jon
.
- References:
- Can a generic class re-create itself with another type
- From: tadmill
- Can a generic class re-create itself with another type
- Prev by Date: Reading bytes from stdin efficiently
- Next by Date: Re: Conditional Attribute on Method when the condition is met
- Previous by thread: Can a generic class re-create itself with another type
- Next by thread: RE: Can a generic class re-create itself with another type
- Index(es):
Relevant Pages
|