2

I know how to use and the meaning of out and in.
But why can we not use it on regular generic type class and give the class same ablility like this:

public class Some<out T>
{
}
Some<Derived> a = new Some<Derived>();
Some<Base> b = a;
Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188
Bucketcode
  • 461
  • 2
  • 13

0 Answers0