Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#covariance and contravarianceSingle-choice MCQ

Why does this generic method fail to compile when the variance is declared as shown?

interface IProducer<out T> { T Get(); void Set(T value); // <-- this line }