3.2. Displaying a Line of Text

We begin by considering a simple program (Fig. 3.1) that displays a line of text. When this program runs, its output appears in a Command Prompt window. We show such output in a blue box following the program listing. You will see what a Command Prompt window looks like later in this section, when we explain the process of creating a console application.

Figure 3.1. Simple Visual Basic program.
					1
					' Fig. 3.1: Welcome1.vb
					2
					' Simple Visual Basic program.
					3
					4
					Module FirstWelcome
5
					6
					Sub Main()                                      
					7
					
					
					8
					   Console.WriteLine("Welcome to Visual Basic!")
					9
					
					
					10
					End Sub
						' Main
					
					11
					12
					End Module
					' FirstWelcome
				
Welcome to Visual Basic!

Analyzing the Program

This program illustrates several important Visual Basic features. ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.