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

Why does the C# compiler forbid declaring the type parameter as 'out T' in this interface?

public interface IBox<out T> { T Get(); void Set(T value); }