語言

Process.WaitForExitStatus 方法

定義

無限期等待流程結束。

public:
 System::Diagnostics::ProcessExitStatus ^ WaitForExitStatus();
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public System.Diagnostics.ProcessExitStatus WaitForExitStatus();
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.WaitForExitStatus : unit -> System.Diagnostics.ProcessExitStatus
Public Function WaitForExitStatus () As ProcessExitStatus

傳回

流程的退出狀態。

屬性

例外狀況

此物件沒有相關聯的程序,或程序的處理柄或退出狀態不可用。

程序物件已被處置。

這個過程是在遠端電腦上進行的。

目前平台不支援,或者在 Unix 上,這個程序不是子程序。

備註

在 Unix 上,僅支援子程序取得退出狀態。

適用於