将对象数组转换为字符串数组时,它叫什么?

发布于 2024-07-29 13:24:06 字数 64 浏览 2 评论 0原文

它有一个特殊的名字,但我不记得是什么了。 有两种不同的术语,一种是将子类的数组转换为其超类的数组,另一种则相反。

There's a special name for it, but I can't remember what it is. There are two different terms, one for casting an array of a subclass to an array of its superclass, and the other way around.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小糖芽 2024-08-05 13:24:06

数组向上转换和数组向下转换。

编辑:协变和逆变能够根据组合和继承语义将某些类型视为相同或不相同。 这与转换数组无关,这恰好是协方差发挥作用的一种情况。

Array Upcasting and Array Downcasting.

EDIT: Covariance and Contravariance is ability to treat certain types as same or not the same depending on composition and inheritance semantics. This has nothing to do with casting arrays, which just happen to be one case where co-variance comes into play.

若沐 2024-08-05 13:24:06

协方差和逆变。 大概。

Co-variance and contra-variance. Probably.

落花随流水 2024-08-05 13:24:06

装箱和拆箱?

Boxing and Unboxing?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文