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

AF SDK Reference

AFCollection(T).Remove Method (Guid)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFCollection(T).Remove Method (Guid)
Removes the item with the specified id from the collection.

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

Syntax

public bool Remove(
	Guid id
)
Public Function Remove ( 
	id As Guid
) As Boolean

Dim instance As AFCollection
Dim id As Guid
Dim returnValue As Boolean

returnValue = instance.Remove(id)
public:
virtual bool Remove(
	Guid id
) sealed
abstract Remove : 
        id : Guid -> bool 
override Remove : 
        id : Guid -> bool 

Parameters

id
Type: SystemGuid
The id of the item to remove.

Return Value

Type: Boolean
Returns if the item is successfully removed; otherwise, . This method also returns if id was not found in the original collection.

Remarks

This method removes the item from the collection with the specified id. The id of the item is also removed from the lookup dictionary. This method approaches an O(1) operation.

If there is a need to delete many objects at once, it is better to delete them in bulk by using the delete method with a specified list of ids.

Version Information

AFSDK


See Also

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