UtilPlatformVersion Property |
Current Platform version in Major.Minor form
Namespace: ASCOM.UtilitiesAssembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.6.9999.9999)
Syntaxpublic string PlatformVersion { get; }Public ReadOnly Property PlatformVersion As String
Get
public:
virtual property String^ PlatformVersion {
String^ get () sealed;
}Return Value
StringCurrent Platform version in Major.Minor form
RemarksPlease be careful if you wish to convert this string into a number within your application
because the ASCOM Platform is used internationally and some countries use characters other
than point as the decimal separator.
If your application tries to convert 5.5 into a Double value when running on a PC localised to
France, you will get an exception because the French decimal separater is comma and 5.5 is not
a valid representation of a decimal number in that locale.
If you still wish to turn the Platform Version into a Double value, you can use an
approach such as this:
If Double.Parse(Util.PlatformVersion, CultureInfo.InvariantCulture) < 5.5 Then...
If you just wish to test whether the platform is greater than a particular level,
you can use the IsMinimumRequiredVersion method.
See Also