为什么的Int32值类型? [英] Why is Int32 a value type?

查看:155
本文介绍了为什么的Int32值类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么System.Int32的派生从System.Object(直通System.ValueType),而System.Object的是引用类型的值类型?

Why does System.Int32 that derives from System.Object (thru System.ValueType) a value type while System.Object is a reference type?

推荐答案

由于 System.ValueType 是什么让我们通过覆盖从系统的某些虚拟成员使用装箱/拆箱.Object。

Because System.ValueType is what allows us to use boxing/unboxing by overriding certain virtual members from System.Object.

这篇关于为什么的Int32值类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆