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
 
Back
Top