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

AF SDK Reference

AFEnumerationValues.GetByValue Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFEnumerationValues.GetByValue Method
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: AFEnumerationValue
Returns 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.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5

See Also

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