Co(ntra)variantly (In)valid
Sometimes I have a problem and I think to myself, "I'll solve this with generic constraints and variance."
Now I have an
ISolutionFactory<in TProblem, out TSolution> where TProblem : class, IProblem where TSolution : class, ISolution
...but no one can figure out how to use it without getting "Invalid variance" errors from the compiler.