OperatingSystem.IsMacOS Method

Definition

Indicates whether the current application is running on macOS.

C#
public static bool IsMacOS();

Returns

true if the current application is running on macOS; false otherwise.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10