Jagamisviis:


WindowsServiceHelpers.IsWindowsService Method

Definition

Check if the current process is hosted as a Windows Service.

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

Returns

true if the current process is hosted as a Windows Service; otherwise, false.

Attributes

Applies to