Can I have a type (for now forgetting its semantics) that can be covariant as well as contravariant?
for example:
public interface Foo<in out T>
{
void DoFooWith(T arg);
}
Off to Eric Lippert's blog for the meat and potatoes of variance in C# 4.0 as there's little else anywhere that covers adequate ground on the subject.
I tried it out anyway, not only does it not allow that, but it tells me I am missing the whole point. I need to understand the link between read-only, write-only and variance.
I guess I got some more reading to do.
But any short, epiphany inducing answers are welcome, meanwhile.