这就是所谓的协变返回类型的方法。
如果标记为out,那么接口就支持协变,并且给定的类型只能表现为一个返回类型或只读属性。
If marked as out, the interface supports co-variance and the given type can only appear as a return type or read-only property.
在泛型接口或委托中,如果类型形参仅用作方法返回类型,而不用于方法实参,则可声明为协变的。
A type can be declared contravariant in a generic interface or delegate if it is used only as a type of method arguments and not used as a method return type.
应用推荐