June 2006
Intermediate to advanced
1344 pages
42h 52m
English
The message Welcome to Visual Basic! can be displayed using multiple statements. Fig. 3.15 uses two method calls to produce the same output as the program in Fig. 3.1.
1 ' Fig. 3.15: Welcome2.vb 2 ' Displaying a line of text with multiple statements. 3 4 Module SecondWelcome 5 6 Sub Main() 7 8 Console.Write("Welcome to ") 9 Console.WriteLine("Visual Basic!") 10 11 End Sub ' Main 12 13 End Module ' SecondWelcome
|
Lines 8–9 of Fig. 3.15 display only one line of text in the Console window. The first statement calls Console method Write to display a string. Unlike WriteLine, Write does not position ...
Read now
Unlock full access