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;
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;