OperatingSystem.IsFreeBSDVersionAtLeast(Int32, Int32, Int32, Int32) 方法

定义

检查 FreeBSD 版本(由 Linux 命令Checks if the FreeBSD version (returned by the Linux command uname返回)是否大于或等于指定版本。) is greater than or equal to the specified version. 此方法可用于保护在指定版本中添加的 API。This method can be used to guard APIs that were added in the specified version.

public static bool IsFreeBSDVersionAtLeast (int major, int minor = 0, int build = 0, int revision = 0);
static member IsFreeBSDVersionAtLeast : int * int * int * int -> bool
Public Shared Function IsFreeBSDVersionAtLeast (major As Integer, Optional minor As Integer = 0, Optional build As Integer = 0, Optional revision As Integer = 0) As Boolean

参数

major
Int32

主版本号。The major release number.

minor
Int32

次版本号。The minor release number.

build
Int32

内部版本号。The build release number.

revision
Int32

修订版本号。The revision release number.

返回

Boolean

如果当前应用程序正在运行的 FreeBSD 版本不低于参数中指定的版本,则为 true;否则 falsetrue if the current application is running on a FreeBSD version that is at least what was specified in the parameters; false otherwise.

适用于