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

Which assignment compiles, given the generic interface declarations shown?

interface IProducer<out T> { T Get(); } interface IConsumer<in T> { void Use(T item); } // class Dog : Animal { }