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

Value Types

Unlike reference types, which are created from classes, there is a further basic element for saving data in .NET Framework, namely the value type. Value types are the variables that store the humble base data types, such as integers, strings, and dates. But why not implement all data types as objects? There’s a simple reason: it’s a lot of work. Consider that even for the smallest integer variable, you need to reserve memory space, write the value that will be represented by the integer variable into this memory space, place the reference to this memory space into an object variable, and then retrieve this variable from the memory whenever you want to access it.. A purely object-oriented language would treat all variables as reference ...

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