I'm stuck with this problem for several hours. I'm trying to find an equivalent method for C#.
Java, works:
public class Main
{
public static void main(String[] args)
{
ArrayList<BaseList<? extends Base>> list = new ArrayList<>();
list.add(new DerivedList());
}
}
public class BaseList<T extends Base>
{
}
public class Base
{
}
public class DerivedList extends BaseList<Derived>
{
}
public class Derived extends Base
{
}
I need an equivalent method for ArrayList<BaseList<? extends Base>>
in C#. I hope someone help me.
And is it posible in C# to wildcard your variables??