AFEnumerationValues.GetByValue Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Gets the specified AFEnumerationValue from the collection
by its value.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFEnumerationValue GetByValue( int enumValue )
Public Function GetByValue ( enumValue As Integer ) As AFEnumerationValue Dim instance As AFEnumerationValues Dim enumValue As Integer Dim returnValue As AFEnumerationValue returnValue = instance.GetByValue(enumValue)
public: AFEnumerationValue^ GetByValue( int enumValue )
member GetByValue : enumValue : int -> AFEnumerationValue
Parameters
- enumValue
- Type: SystemInt32
The value of the AFEnumerationValue.Value property of the enumeration value to be returned.
Return Value
Type: AFEnumerationValueReturns the AFEnumerationValue whose Value property equals the specified enumValue parameter.
Remarks
This method is similar to the collection's indexer (see ItemString) except
the object is retrieved by value instead of by name.