Console application


J

jam

Hello all,

how can I stop the current process when I am write a console application??
Also, can i run command prompt command in the console application??
the programme I am writing is to get data from data base and then generate
some txt file, I wanna stop it when it reaches some error/special text

thanks,
Chris Choi
 
Ad

Advertisements

D

Dmitriy Lapshin [C# / .NET MVP]

Hello Chris,
Also, can i run command prompt command in the console application??
Yes, by using the System.Diagnostics.Process class and setting
UseShellExecute to 'true' in the ProcessStartupInfo structure.
how can I stop the current process when I am write a console application??
Just exit from the Main method.
 
Ad

Advertisements

J

jam

thx a lot, I will try on this,
Dmitriy Lapshin said:
Hello Chris,
Also, can i run command prompt command in the console application??
Yes, by using the System.Diagnostics.Process class and setting
UseShellExecute to 'true' in the ProcessStartupInfo structure.
how can I stop the current process when I am write a console
application??

Just exit from the Main method.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

jam said:
Hello all,

how can I stop the current process when I am write a console application??
Also, can i run command prompt command in the console application??
the programme I am writing is to get data from data base and then generate
some txt file, I wanna stop it when it reaches some error/special text

thanks,
Chris Choi
 

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 Applications 8
Application and Console??? 3
Console Application 7
Console application 1
console applications 3
Console Application 1
Console application 1
Console Application 2

Top