OperatingSystem.IsIOSVersionAtLeast(Int32, Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檢查 iOS/MacCatalyst 版本(由 libobjc.get_operatingSystemVersion返回)是否大於或等於指定版本。 此方法可用來保護指定 iOS 版本中新增的 API。
[System.Runtime.Versioning.SupportedOSPlatformGuard("maccatalyst")]
public static bool IsIOSVersionAtLeast(int major, int minor = 0, int build = 0);
public static bool IsIOSVersionAtLeast(int major, int minor = 0, int build = 0);
[<System.Runtime.Versioning.SupportedOSPlatformGuard("maccatalyst")>]
static member IsIOSVersionAtLeast : int * int * int -> bool
static member IsIOSVersionAtLeast : int * int * int -> bool
Public Shared Function IsIOSVersionAtLeast (major As Integer, Optional minor As Integer = 0, Optional build As Integer = 0) As Boolean
參數
- major
- Int32
主要的發行編號。
- minor
- Int32
次要發行號碼。
- build
- Int32
版本發佈號。
傳回
true 若目前應用程式運行於 iOS/MacCatalyst 版本,至少符合參數中指定的條件; false 否則,
- 屬性