Using Value Types
In this paragraph you learn to use value types. The following demonstration assumes you have created a new Visual Basic project for the Console (see Chapter 2 for details). Listing 4.1 shows how you can declare variables storing value types. You can write the code inside the Main
method for learning purposes.
You can declare variables of the desired value types using the Dim
keyword followed by the identifier of the variable and by the As
clause that then requires the type specification.
Get Visual Basic® 2010 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.