Why the concept of “Covariance” and “Contravariance” are applicable while implementing the methods of an interface?
问题 The use case is some what like this: public class SomeClass : ICloneable { // Some Code // Implementing interface method public object Clone() { // Some Clonning Code } } Now my question is Why is it not possible to use "SomeClass(As it is derived from object)" as a return type of Clone() method if we consider the Funda's of Covariance and Contravariance ? Can somebody explain me the reason behind this implementation of Microsoft ???? 回答1: A non-broken implementation of interface