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

AF SDK Reference

AFEnumerationSet.Add Method (String, Int32)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFEnumerationSet.Add Method (String, Int32)
The Add method creates a new AFEnumerationValue and adds it to the collection with the specified name and value.

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

Syntax

public AFEnumerationValue Add(
	string name,
	int value
)
Public Function Add ( 
	name As String,
	value As Integer
) As AFEnumerationValue

Dim instance As AFEnumerationSet
Dim name As String
Dim value As Integer
Dim returnValue As AFEnumerationValue

returnValue = instance.Add(name, value)
public:
AFEnumerationValue^ Add(
	String^ name, 
	int value
)
member Add : 
        name : string * 
        value : int -> AFEnumerationValue 

Parameters

name
Type: SystemString
The name for the new object, which must be unique within the collection. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.
value
Type: SystemInt32
The value for the new object.

Return Value

Type: AFEnumerationValue
Returns the newly created object that was added to the collection.

Remarks

The new AFEnumerationValue will be created with the specified name and value.

Version Information

AFSDK


See Also

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