Working With Visual Basic Types

Having introduced a combination of keywords and concepts for objects in Visual Basic, it is time to start exploring specific types. In order to ensure this is hands on, you need a project in Visual Studio 2012. The first chapter focused on Visual Studio 2012 and many of its features as your primary development tool. This chapter is much more focused on the Visual Basic language, and to limit its size you are going to reference the project created in the first chapter. As this chapter introduces some of the core types of Visual Basic classes provided by the .NET Framework, you will use the test code snippets from this chapter in that project.

You can create a new project based on the ProVB2012 project from Chapter 1 and use it to host the example snippets throughout this chapter. The code download for this chapter includes the final version of the samples in a project titled ProVB2012_Ch03. This means that as you progress through the chapter, you can either look in the sample download for the same code, or step-by-step build up your own copy of the sample, using the sample when something doesn't seem quite right in your own code. One change from the previous chapter's code is that the custom property and message box used in that chapter have already been removed from this project.

At this point, you have a display that allows you to show the results from various code snippets simply by updating the Text property on the TextBox1 control of your window. ...

Get Professional Visual Basic 2012 and .NET 4.5 Programming 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.