Re: Console Applications

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: William Stacey [MVP] (staceywREMOVE_at_mvps.org)
Date: 03/24/04


Date: Tue, 23 Mar 2004 20:19:41 -0500

If you write something like Console.Writeline("hello"); You need to add a
Console.Read() as last line so the Console windows does not write hello and
close (it closes automatically in debug mode after it runs.) The
Console.Read or Console.Readline will wait for user input (i.e. enter)
before closing so you can see what you output to console. HTH

-- 
William Stacey, MS MVP
"Michael W" <anonymous@discussions.microsoft.com> wrote in message
news:725E4CDE-A577-4E43-A873-A767FFF49166@microsoft.com...
> I'm a complete newbie at programming.  I chose to learn C# as my
programming language.  Every book I purchase starts with console
applications.  Each time I try to run the apps that I build, it will only
display for a few seconds then it will disappear?  I'm running Windows XP
and have VS.net.  Is there some way that I can view the output of my console
applications with out it shutting off on me?  I'm getting discouraged
because I want to build Windows apps and not console apps right now?  I
can't seem to run any command line apps.  I'm stuck because these books
teach you the basics of the language using console apps.  I want to skip
past this but I miss out on so much.   Please help!!!!


Relevant Pages

  • Re: CreateProcessAsUser - Process starts then exits
    ... Windows XP Media Center ... public Int32 dwX; ... public IntPtr lpReserved2; ... parent's console. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CreateProcessAsUser - Process starts then exits
    ... service most likely runs in a separate invisible session. ... the program I was trying to start was a windows forms app I ... public IntPtr lpReserved2; ... parent's console. ...
    (microsoft.public.win32.programmer.kernel)
  • Novell Client login form enables reading and writing from and to the clipboard of the logged-in
    ... Novell Client for Windows, ... Anyone with access to the computer's local operating system console, ... inject its own textual content into the clipboard of the currently logged-in ...
    (Bugtraq)
  • Re: New HDD Installation
    ... Right clicking on the partition or using the | Action> All Tasks menu at the top of the console should show the option, either greyed out or usable to make the partition active. ... Do the fixboot and fixmbr things in the Recovery Console then see if things change. ... There are other ways to mark the partition active, either with a Windows 98 startup disk or using the DISKPART command while in Windows XP. ...
    (microsoft.public.windowsxp.general)
  • Re: Cannot Correctly Preview Fax in Fax Console
    ... I no way do I doubt what you are saying, but until now, all known problems with previewing faxes have had one of two causes: incorrect file associations for TIF files or end user error using Windows Picture and Fax viewer. ... >>>I have used the fax printer Windows accessory many times. ... The Fax console comes>>> up. ...
    (microsoft.public.windowsxp.print_fax)