Chapter 12. Typecasting and Boxing Value Types

In many cases, you’ll need to convert variables of one type into different types. This process is called Typecasting (as in giving it a role to play), and it includes:

  • The physical conversion of a concrete value into another type—data is processed, analyzed, and saved at a different location.

  • Assigning an object variable to a different object variable of a different but derived type (a type that’s based on the first variable’s class). For example, an object variable of the parent class FirstClass can be set to reference ...

Get Microsoft® Visual Basic® 2010 Developer’s Handbook 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.