✅ How do I deal with generic covariance and collections types?
Let's say I have osmething like the following:
I get the following error:
I've looked around on how to resolve this issue but haven't found anything. Is there an easy solution to this problem, or is there a pattern which will accomplish what I'm looking for?
I get the following error:
Invalid variance: The type parameter 'T' must be invariantly valid on 'IBoxCollection<T>.Collection'. 'T' is covariantI've looked around on how to resolve this issue but haven't found anything. Is there an easy solution to this problem, or is there a pattern which will accomplish what I'm looking for?