July 2015
Intermediate to advanced
1300 pages
87h 27m
English
The common type system enables implicit conversions. It also enables conversions between reference types and value types—and vice versa—because both inherit from System.Object. You often need to work with two techniques, boxing and unboxing, when you have methods that receive arguments of type Object.
Boxing occurs when you convert a value type to a reference type. In other words, boxing happens when you assign a value type to an Object. The following lines of code demonstrate boxing:
Dim calculation As Double = 14.4 + 32.12Dim result As Object = calculation
In this example, the calculation variable, which stores a value deriving from the sum of two numbers, is a Double value type. The ...