Re: child type cannot be used as generic type parameter

Tech-Archive recommends: Speed Up your PC by fixing your registry



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
.