简体   繁体   中英

Is int32 a polymorphism of object?

When i do

int k=3;

where in the reflector can i find the pseudo statement?

Object k = new Int32();

where can i find the value assign?

Even though primitive types inherit from Object, the .net Framework treats them in a special way. An int is an int and treated using functions like ldc.i4 (loads a 32-bit constant onto the stack).

In situations where an object is needed, an int is indeed cast to Object through a process called boxing .

No such statement exists.

Int32 is an immutable value type.
3 itself is an Int32 value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM