Summary

The CLR treats values as simple formatted chunks of memory. Even so, a value created from a structure can provide its own unique behavior in the form of methods and properties. The use of values can be more efficient than the use of objects, because a value can be created directly on the call stack and accessed without the use of a reference. A value is also more efficient than an object, because it doesn't require the attention of the garbage collector.

While objects require more overhead than values, they also provide greater capabilities. Objects can live independently, whereas values cannot. Because objects provide more flexibility than values, their design can become more complicated as well. Objects do not support the ability to ...

Get Building Applications and Components with Visual Basic .NET 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.