Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAttributeVariable.CompareTo Method (AFAttributeVariable)

AFAttributeVariable.CompareTo Method (AFAttributeVariable)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAttributeVariable.CompareTo Method (AFAttributeVariable)
Compares this instance with a specified AFAttributeVariable.

Namespace:  OSIsoft.AF.Analysis
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public int CompareTo(
	AFAttributeVariable obj
)
Public Function CompareTo ( 
	obj As AFAttributeVariable
) As Integer

Dim instance As AFAttributeVariable
Dim obj As AFAttributeVariable
Dim returnValue As Integer

returnValue = instance.CompareTo(obj)
public:
virtual int CompareTo(
	AFAttributeVariable^ obj
) sealed
abstract CompareTo : 
        obj : AFAttributeVariable -> int 
override CompareTo : 
        obj : AFAttributeVariable -> int 

Parameters

obj
Type: OSIsoft.AF.AnalysisAFAttributeVariable
The object to be compared.

Return Value

Type: Int32

A 32-bit signed integer that indicates the relative order of the comparands. The return value has these meanings:

ValueMeaning
Less than zero This instance is less than obj.
Zero This instance is equal to obj.
Greater than zero This instance is greater than obj.

Implements

IComparableTCompareTo(T)

Exceptions

ExceptionCondition
ArgumentException The obj parameter is not the same type as this instance.

Remarks

By definition, any object compares greater than and two null references compare equal to each other.

This method uses the Name of the objects to perform the comparison operation.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in