次の方法で共有


WindowsServiceHelpers.IsWindowsService メソッド

定義

現在のプロセスが Windows サービスとしてホストされているかどうかを確認します。

public:
 static bool IsWindowsService();
[System.Runtime.Versioning.SupportedOSPlatformGuard("windows")]
public static bool IsWindowsService();
public static bool IsWindowsService();
[<System.Runtime.Versioning.SupportedOSPlatformGuard("windows")>]
static member IsWindowsService : unit -> bool
static member IsWindowsService : unit -> bool
Public Shared Function IsWindowsService () As Boolean

戻り値

現在のプロセスが Windows サービスとしてホストされている場合は true。それ以外の場合は false

属性

適用対象