ServiceBase.ExitCode 屬性

定義

取得或設定服務的結束代碼 (Exit Code)。Gets or sets the exit code for the service.

public:
 property int ExitCode { int get(); void set(int value); };
[System.Runtime.InteropServices.ComVisible(false)]
public int ExitCode { get; set; }
member this.ExitCode : int with get, set
Public Property ExitCode As Integer

屬性值

服務的結束代碼。The exit code for the service.

屬性

備註

ExitCode將屬性設定為非零值,再停止服務以向服務控制管理員表示錯誤。Set the ExitCode property to a non-zero value before stopping the service to indicate an error to the Service Control Manager.

適用於