System.Diagnostics.Process.Close Method

Frees all the resources that are associated with this component.

Syntax

public void Close ()

Remarks

The Process.Close method causes the process to stop waiting for exit if it was waiting, closes the process handle, and clears process-specific properties. Process.Close does not close the standard output, input, and error readers and writers in case they are being referenced externally.

Note:

The Process.Dispose(bool) method calls Process.Close. Placing the System.Diagnostics.Process object in a using block disposes of resources without the need to call Process.Close.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0