ConsoleAppModule.vb

 1: ' A demo of a console application.  These applications should be run from
 2: ' the MS-DOS command prompt.  When run using Visual Studio debugger, a console
 3: ' window will appear, however it vanishes as soon as the program ends.  To
 4: ' keep the window open it is a common practice to make the user type something.
 5: '
 6: ' Console applications don't require any classes, just a Sub procedure named
 7: ' "Main" (in some module of course).  The module containing the Main procedure
 8: ' is set in the project's properties.
 9: '
10: ' In this demo the program merely counts down using a For-Next loop.
11: '
12: ' Written 3/2010 by Wayne Pollock, Tampa Florida USA
13: 
14: Module ConnsoleAppModule
15: 
16:     Sub Main()
17:         For i As Integer = 10 To 1 Step -1
18:             Console.Write(i.ToString() & "...")
19:         Next
20:         Console.WriteLine(Environment.NewLine & "Blast-off!")
21: 
22:         Console.WriteLine(Environment.NewLine & Environment.NewLine & _
23:                           "(Hit any key to exit)")
24:         Console.ReadKey(True) ' Wait for user to hit any key.
25:     End Sub
26: 
27: End Module