|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
console applicationsI have a console application...i run the code i need to run
its all good....but when its back to the main it has a wait press any key how to make console applications just exit thanks DaveL "DaveL" <dvs_***@sbcglobal.net> wrote in message Well, it depends on what your code says...news:QRh0l.11225$ZP4.9604@nlpi067.nbdc.sbc.com... >I have a console application...i run the code i need to run > its all good....but when its back to the main > it has a wait press any key > > how to make console applications just exit > > thanks > DaveL > > I would guess you have something like: Console.Out.WriteLine("Presss any key..."); Console.In.ReadLine(); Take those lines out... -- Mike On Thu, 11 Dec 2008 16:03:53 -0800, DaveL <dvs_***@sbcglobal.net> wrote:
> I have a console application...i run the code i need to run Remove the line of code that waits for the user to press a key.> its all good....but when its back to the main > it has a wait press any key > > how to make console applications just exit None There
here is a piece of code class Program { static void Main(string[] args) { BatchJob oBatch = new BatchJob(); try { oBatch.LoadClassConfig(); oBatch.IsUserInterface = true; oBatch.RunJob(); } catch (Exception ex) { if (oBatch.IsUserInterface == true) { NetTools.dvErrorSysWin.ShowError(ex); } } Console.WriteLine("here"); //still shows press any key at this point return; } } Show quoteHide quote "Peter Duniho" <NpOeStPe***@nnowslpianmk.com> wrote in message news:op.ul0wvfib8jd0ej@petes-computer.local... > On Thu, 11 Dec 2008 16:03:53 -0800, DaveL <dvs_***@sbcglobal.net> wrote: > >> I have a console application...i run the code i need to run >> its all good....but when its back to the main >> it has a wait press any key >> >> how to make console applications just exit > > Remove the line of code that waits for the user to press a key. I found the problem....i did nto realize
while in vs running it the host process does the press any key sorry DaveL Show quoteHide quote "Peter Duniho" <NpOeStPe***@nnowslpianmk.com> wrote in message news:op.ul0wvfib8jd0ej@petes-computer.local... > On Thu, 11 Dec 2008 16:03:53 -0800, DaveL <dvs_***@sbcglobal.net> wrote: > >> I have a console application...i run the code i need to run >> its all good....but when its back to the main >> it has a wait press any key >> >> how to make console applications just exit > > Remove the line of code that waits for the user to press a key.
Other interesting topics
Private, Public, ... ?
Case insensitive generic list search ? How to stop a working thread Confused about conversion new to socket programming; did i miss anything? MVP pattern and application/user settings in WinForm MT Data Retrieval Question Anybody trying WPF? Splash screen loading slow on Vista? [FileSystemWatcher] Missing Notifications |
|||||||||||||||||||||||