Search code examples
c#objectboxing

Object type and boxing


MSDN says that

The object data type is the type to and from which objects are boxed.

I thought only value types are boxed? Now I am bit confused. So when I assign reference type variable to object variable, its boxing?


Solution

  • Only value types are boxed.

    So, to be accurate the sentence should be:

    "The object data type is the type to and from which values are boxed."