I have two interfaces:
public interface A {
void aMethod();
}
public interface B : A {
void bMethod();
}
Later I\'m basically using
The feature you are looking for is what's referred to as generics variance (covariance and contravariance). There is limited support for this starting in .net framework 4. Here's an interesting post: How is Generic Covariance & Contra-variance Implemented in C# 4.0?
And here's the MSDN entry on Covariance and Contravariance in Generics.