Click or drag to resize
UtilIsMinimumRequiredVersion Method
Tests whether the current platform version is at least equal to the supplied major and minor version numbers, returns false if this is not the case

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.3.0.2839)
Syntax
public bool IsMinimumRequiredVersion(
	int RequiredMajorVersion,
	int RequiredMinorVersion
)

Parameters

RequiredMajorVersion
Type: SystemInt32
The required major version number
RequiredMinorVersion
Type: SystemInt32
The required minor version number

Return Value

Type: Boolean
True if the current platform version equals or exceeds the major and minor values provided
Remarks
This function provides a simple way to test for a minimum platform level. If for example, your application requires at least platform version 5.5 then you can use code such as this to make a test and display information as appropriate.
Const requiredMajorVersion as Integer = 5
Const requiredMinorVersion as Integer = 5 ' Requires Platform version 5.5
Dim Utils as New ASCOM.Utilities.Util
isOK = Utils.IsMinimumRequiredVersion(requiredMajorVersion, requiredMinorVersion)
If Not isOK Then 
   ' Abort, throw exception, print an error or whatever.
   End
EndIf
See Also