AFAdmin.GetVersion Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Converts the string representing a version to a Version object.
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static Version GetVersion( string version )
Public Shared Function GetVersion ( version As String ) As Version Dim version As String Dim returnValue As Version returnValue = AFAdmin.GetVersion(version)
public: static Version^ GetVersion( String^ version )
static member GetVersion : version : string -> Version
Parameters
- version
- Type: SystemString
The string representing a version to be converted.
Return Value
Type: VersionIf the conversion succeeds, returns the Version equivalent of the number that is contained in the version parameter. When the conversion fails, is returned.
Remarks
Attempts to convert the string representation of a version number to an equivalent
Version object. The first part of the version string must be in a
format that can be parsed by TryParse(String, Version) with
a space separating an optional version label after the version number.