WindowsServiceHelpers.IsWindowsService Method

Definition

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

public:
 static bool IsWindowsService();
public static bool IsWindowsService ();
static member IsWindowsService : unit -> bool
Public Shared Function IsWindowsService () As Boolean

Returns

Boolean

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

Applies to