Process.StartTime Property

Definition

Gets the time that the associated process was started.

public:
 property DateTime StartTime { DateTime get(); };
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public DateTime StartTime { get; }
public DateTime StartTime { get; }
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.StartTime : DateTime
member this.StartTime : DateTime
Public ReadOnly Property StartTime As DateTime

Property Value

A DateTime that indicates when the associated process was started.

Attributes

Exceptions

You are attempting to access the StartTime 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.

No process is associated with this object; on Windows, there is no process handle available; or on Unix, the value was not cached and is unavailable after the process exited.

An error occurred in the call to the Windows function.

Remarks

On Windows, if a handle to the process is available, this property can be read after the process has exited. On Unix, this property caches its value on first access. A cached value can be read after the process has exited, but accessing an uncached value after the process has exited can throw InvalidOperationException when the value is unavailable.

Applies to