Covariance and Contravariance in C#
Let's talk about Contravariance and Covariance in C# using .NET Framework examples!
Contravariance and covariance are essential concepts in C# when dealing with generics, enabling us to have more flexibility when assigning generic types. So let's have examples straight from the framework itself!
Also, we will go a bit deeper and talk what some differences between generic constraints and things like Contravariance are.