I have a C # application that I launch, and then at some point the application throws an error, which then gets caught, then the application should end. And it ends, but the console windows remain open ...
I even checked in windows task manager, under the tab applications, my console is displayed there, but when I click go to process, the process of this application is missing.
Thats weird ... The application has ended, the process has ended, but the console remains on? How can I kill this console?
Edit: my code:
static class Program
{
static void Main()
{
try
{
Setup.Driver.Close();
}
catch (Exception)
{
Setup.Driver.Close();
}
}
}
Second edit: Note: Process.Getprocess (). Kill (), Application.Exit (), Environment.Exit () do not work for me, in the Windows task manager there is no process left to kill, only the console remains open!