Kill own process

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I' m currently developing a service that displays a window to the user
(interactive). Now, when the user cancels the window, the whole process shall
be killed. But how can I kill my own process in VB.NET?

Thanks a lot
Peter
 
I think a counter question would be, why would you like to kill the
process??

It feels like fishing with dynamite.
 
Peter said:
Hi,

I' m currently developing a service that displays a window to the user
(interactive). Now, when the user cancels the window, the whole process shall
be killed. But how can I kill my own process in VB.NET?

Thanks a lot
Peter

System.Diagnostics.Process.GetCurrentProcess().Kill()

allthough if you need to kill your own process, there's most likely
something else wrong and you should really be looking to fix that
instead of killing the process
 

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

Back
Top