I'm having a little trouble understanding how I would use covariance and contravariance in the real world.
So far, the only examples I've seen have been the same old array example.
object[] objectArray = new string[] { "string 1", "string 2" };
It would be nice to see an example that would allow me to use it during my development if I could see it being used elsewhere.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…