Export (0) Print
Expand All

Process::ExitTime Property

Gets the time that the associated process exited.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

[BrowsableAttribute(false)]
[MonitoringDescriptionAttribute(L"ProcessExitTime")]
public:
property DateTime ExitTime {
	DateTime get ();
}

Property Value

Type: System::DateTime
A DateTime that indicates when the associated process was terminated.

ExceptionCondition
PlatformNotSupportedException

The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.

NotSupportedException

You are trying to access the ExitTime property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.

If the process has not terminated, attempting to retrieve the ExitTime property throws an exception. Use HasExited before getting the ExitTime property to determine whether the associated process has terminated.

The following code example creates a process that prints a file. The process raises the Exited event when it exits, and the event handler displays the ExitTime property and other process information.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • LinkDemand 

    for full trust for the immediate caller. This member cannot be used by partially trusted code.

Show:
© 2015 Microsoft