what is the console

Posted on 2006-04-17
Last Modified: 2010-07-27
Okay, I'm done trying to figure this out.  What is the console?

What does console.writeline do -- where does it write?
What does console.readline do -- what does it read?

I'm using VB.Net 2003

Big points hoping for a thorough explanation.

Thanks ...
Question by:g_johnson
    LVL 48

    Accepted Solution

    These functions are used in a Console application, which runs in Command (DOS) Window, or Console. Console.WriteLine writes new text line to the Command window. Console.ReadLine reads line of text from the Command window. User must type some text and press Enter to complete this command.

    Dim s as String
    Console.WriteLine("Please enter your name")
    s = Console.ReadLine
    Console.WriteLine("Your name is " + s)
    LVL 85

    Assisted Solution

    by:Mike Tomlinson
    For a WINFORMS app:

        Console.WriteLine() outputs to the Debug window.
        Console.ReadLine() does nothing as far as I know...
    LVL 4

    Author Comment

    AlexFM -- so you basically write a .Net application and create an exe that is designed to be used in the command window?  When would you choose that over a WINFORMS app?
    LVL 48

    Expert Comment

    When you want to write command line utility. For example, you write some command line tool which can be used by system administrator for running inside batch files.
    In most cases we make Windows applications with user interface, but command line tools still exist and used.
    Console applications are also used to test some ideas and algorithms, when we don't want to waste time building user interface.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now