Click or drag to resize
UtilPlatformVersion Property
Current Platform version in Major.Minor form

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: (
public string PlatformVersion { get; }

Return Value

Type: String
Current Platform version in Major.Minor form
Please 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