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
 
Ad

Advertisements

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;

}
}
 
Ad

Advertisements

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

Similar Threads

Console application 2
Console Applications 8
Application and Console??? 3
Console Application 7
Console application 1
Console Application 1
Console application 1
Console Application 2

Top