Re: child type cannot be used as generic type parameter
- From: Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Tue, 21 Aug 2007 09:42:18 -0700
Andrus wrote:
KlientBase doesn't derive from ModelGenericBase<KlientBase>
it derives (indirectly) from ModelGenericBase<KlientEntity>.
Surprising.
KlientEntity derives from KlientBase
So ModelGenericBase<KlientEntity> derives also from ModelGenericBase<KlientBase>
Actually, while that's not an uncommon interpretation, it's not true.
If it were, you could wind up with situations in which your ModelGenericBase<KlientEntity> class was using objects that only derived from KlientBase and not KlientEntity.
Pete
.
- References:
- child type cannot be used as generic type parameter
- From: Andrus
- Re: child type cannot be used as generic type parameter
- From: Jon Skeet [C# MVP]
- Re: child type cannot be used as generic type parameter
- From: Andrus
- child type cannot be used as generic type parameter
- Prev by Date: Re: Read text file to Temp file and apply formating and color chan
- Next by Date: Reading and Adding E-mail addresses for a mail-enabled Active Directory User
- Previous by thread: Re: child type cannot be used as generic type parameter
- Next by thread: Re: child type cannot be used as generic type parameter
- Index(es):