语言

ProcessStartInfo.StartSuspended 属性

定义

获取或设置一个值,该值指示是否应以挂起状态启动进程。

public:
 property bool StartSuspended { bool get(); void set(bool value); };
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
[System.Runtime.Versioning.SupportedOSPlatform("macos")]
public bool StartSuspended { get; set; }
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
[<System.Runtime.Versioning.SupportedOSPlatform("macos")>]
member this.StartSuspended : bool with get, set
Public Property StartSuspended As Boolean

属性值

true 如果应暂停进程,则为否则,为 false. 默认值为 false。

特性

注解

当此属性为 true此属性时,将创建进程并挂起其主线程。 直到调用进程句柄(如返回的Start(ProcessStartInfo)句柄)后Resume(),进程才会开始执行。

在Windows,进程以CREATE_SUSPENDED标志启动。

在 macOS 上,进程以标志启动 POSIX_SPAWN_START_SUSPENDED 。

此属性不能与 UseShellExecute 设置为 true.

适用于