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.Interfaces
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
bool IsMinimumRequiredVersion(
	int RequiredMajorVersion,
	int RequiredMinorVersion
)
Visual Basic
Function IsMinimumRequiredVersion ( _
	RequiredMajorVersion As Integer, _
	RequiredMinorVersion As Integer _
) As Boolean
Visual C++
bool IsMinimumRequiredVersion(
	int RequiredMajorVersion, 
	int RequiredMinorVersion
)

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

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 Int requiredMajorVersion = 5;
 Const Int requiredMinorVersion = 5; // Requires Platform version 5.5
 Bool isOK = ASCOM.Utilities.IsMinimumRequiredVersion(requiredMajorVersion,
 requiredMinorVersion);
 If (isOK)
 // Do the install (or whatever)
 Else
 // Abort, throw exception, print an error.

See Also