Understanding Value Types

Value types are data types that directly store data that they define. For example, a System.Int32 object represents a value type that can store an integer number, as in the following line of code:

Dim anInteger As System.Int32 = 5

The most common value types are numeric types that enable, for example, performing math operations or implementing counters or just storing numeric values. Value types enable you to choose the best data type for a particular scenario. As mentioned at the beginning of this chapter, value types are Structure objects. The .NET Framework provides several built-in value types that cover most needs in your development process, although you can create custom data types. ...

Get Visual Basic 2015 Unleashed 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.