What are the differences between kill process and close process?

后端 未结 5 730
北荒
北荒 2020-12-13 07:59

When I start a process and want to close this process, what are the differences between Process.Close() and Process.Kill()?

I asked because

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 08:58

    Process.Kill calls TerminateProcess.

    Process.Close doesn't do what you think it does! It simply frees resources used by the instance of the class. Please read this: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.close.aspx

提交回复
热议问题