O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

When to Use Value Types—When to Use Reference Types

You have already learned that value types were created primarily for better performance. For applications that need to process data extremely fast, it makes sense to use or create data types that can move easily within the computer’s memory. Some examples include:

  • An image requires a large amount of memory when it is loaded from the hard drive into main memory. The memory where an image is stored should of course be set up as a reference type. However, coordinates that define positions on the image and are incorporated into the algorithms for calculating the image should be stored as value types because they need to work quickly.

  • Datasets that you need to keep in memory (for example, for contact ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required