console applications

D

DaveL

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
 
F

Family Tree Mike

DaveL said:
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


Well, it depends on what your code says...

I would guess you have something like:

Console.Out.WriteLine("Presss any key...");
Console.In.ReadLine();

Take those lines out...
 
D

DaveL

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;

}
}
 
D

DaveL

I found the problem....i did nto realize
while in vs running it the host process does the press any key

sorry

DaveL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top