为什么的Int32值类型?类型

2023-09-03 06:34:44 作者:呆到深处自然萌

为什么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.

 
精彩推荐