单词查询

upcasting

释义

adj. 向上扔的;向上的;朝上的; n. 上投;向上扔的东西;【矿】上风井; v. 把…向上抛; 网络释义: 向上转型;向上转换;向上类型转换;

例句

When you upcast to a base interface, you can only access the members specified by that interface, just as for upcasting to base classes.
当你上溯到基接口时,你只可以访问由那个接口所指定的成员,就像上溯到基类那样。
Thus, casting to a base type is moving up the inheritance diagram: upcasting.
所以,造型就是沿着继承图朝着基类向上:向上造型。
Upcasting is applied automatically when you pass arguments to methods on an object type.
当您向某个对象类型上的方法传递参数时,将自动应用向上转换。

单词卡片