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

Among value types, the most common are numeric types that enable, for example, performing math operations or implementing counters or just storing a numeric value. Value types enable developers to choose the best data type according to the particular scenario. As we mentioned at the beginning of this chapter, value types are basically 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. In this section you learn about most common built-in value types and about building your own structures, including how value types are declared and used and how they are stored in memory.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.35.238