Console Application Sample

To get samples and instructions for installing them, see the following:

  • Click Samples on the Visual Studio Help menu.

    For more information, see .

  • The most recent versions and the complete list of samples are available on the Visual Studio 2008 Samples Web site.

  • You can also locate samples on your computer's hard disk. By default, samples and a Readme file are copied to a folder under \Program Files\Visual Studio 9\Samples\. For Visual Studio Express Editions, all samples are located on the Internet.

To run this sample

  • Press F5.

Demonstrates

The project includes an XML file as an embedded resource. The XML file contains the Products table of the Northwind database. The application loads an untyped dataset from the XML file. When the console application is run, it accepts input from the user that is either a product ID or "quit". If "quit" is entered, the console application ends. If a valid product ID is entered, its associated product information is displayed. If an invalid product ID is entered, an exception message is displayed.