Where Are We?

Objects are polymorphic entities that the CLR always allocates on the heap. Values are simply formatted memory that is allocated as part of a declaring context or scope. Both objects and values can support the concept of equivalence and ordering, but only objects can truly support the concept of identity. Although it is possible to force values to act like objects (or objects to act like values), the programming model is much easier to live with when one uses the right kind of instance for the task at hand.

Get Essential .NET, Volume 1: The Common Language Runtime now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.