OperatingSystem.IsOSPlatform(String) Methode

Definition

Gibt an, ob die aktuelle Anwendung auf der angegebenen Plattform ausgeführt wird.

public:
 static bool IsOSPlatform(System::String ^ platform);
public static bool IsOSPlatform(string platform);
static member IsOSPlatform : string -> bool
Public Shared Function IsOSPlatform (platform As String) As Boolean

Parameter

platform
String

Der Name der Plattform ohne Groß-/Kleinschreibung. Beispiele: Browser, Linux, FreeBSD, Android, iOS, macOS, tvOS, watchOS, Windows.

Gibt zurück

true wenn die aktuelle Anwendung auf der angegebenen Plattform ausgeführt wird; false Andernfalls.

Gilt für: