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.1.1.2619)

Syntax

C#
public bool IsMinimumRequiredVersion(
	int RequiredMajorVersion,
	int RequiredMinorVersion
)
Visual Basic
Public Function IsMinimumRequiredVersion ( _
	RequiredMajorVersion As Integer, _
	RequiredMinorVersion As Integer _
) As Boolean
Visual C++
public:
virtual bool IsMinimumRequiredVersion(
	int RequiredMajorVersion, 
	int RequiredMinorVersion
) sealed

Parameters

RequiredMajorVersion
Type: System..::..Int32
The required major version number
RequiredMinorVersion
Type: System..::..Int32
The required minor version number

Return Value

True if the current platform version equals or exceeds the major and minor values provided

Implements

IUtil..::..IsMinimumRequiredVersion(Int32, Int32)

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.
CopyVB.NET
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