Bagikan melalui


WindowsServiceHelpers.IsWindowsService Metode

Definisi

Periksa apakah proses saat ini dihosting sebagai Layanan 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

Mengembalikan

true jika proses saat ini dihosting sebagai Layanan Windows; jika tidak, false.

Atribut

Berlaku untuk