Chapter 13. Creating a Console Application


Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Part III.  User Interface Design

In This Chapter

  • Console Application BasicsConsole Application Basics

  • Using the Console Class

  • Defining the FileSort Demo

  • Console Application Namespaces

  • Multithreading a Console Application

  • Debugging Console Applications

  • Keeping Track of the File System

  • Summary

A console application is an executable program that runs in a command window. Although console applications are decreasing in popularity, you might still have occasion to write a standalone, formless executable that runs at a command prompt. With the incorporation of multithreading in Visual Basic .NET, a console application may be more useful than ever for writing utilities or unattended applications.

In many circumstances, you might want to write an NT Service, a Windows application without a user interface, or a .DLL service that can be managed by an application controller. Console applications are easy to implement because there is no user interface to design. A reasonable use for a console application might be to test code that will ultimately reside in a Windows application.

Chapter 13 provides you with an opportunity to experiment purely with code without forms. Chapter 13 describes features available for building console applications in Visual Basic .NET by implementing a file-sorting utility thatby the end of the chapteris capable of sorting multiple text files at a time using a thread for each file.

This chapter will demonstrate how to define and implement a console application, use the Console namespace, and implement the IComparer interface to define customized sorting behavior. It will also provide more examples of multithreading.


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
Year: 2001
Pages: 222 © 2008-2017.
If you may any questions please contact us: