O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

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

VB.NET Type System

In VB.NET, there is a fundamental distinction between value types and reference types. Value types have storage allocated immediately on the stack when the variable is declared. Reference types have storage allocated on the heap when they are instantiated, not when they are just declared, and the variable is only a reference to the actual object containing the data.

We have been looking at classes in some detail. A class defines a reference type. In this section we survey the entire VB.NET type system, including simple types such as Integer and Decimal. In VB.NET, a Structure has many similarities to a Class, but it is a value type. This means that assigning from one structure variable to another causes the entire structure ...

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