Process::ExitTime Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the time that the associated process exited.

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

public:
[BrowsableAttribute(false)]
property DateTime ExitTime {
	DateTime get();
}

Property Value

Type: System::DateTime

A DateTime that indicates when the associated process was terminated.

Exception Condition
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.

LinkDemand

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

.NET Framework
Available since 1.1
Return to top
Show: