AFNamedCollection(T).Remove Method (String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
The Remove method removes the item from the collection by name.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public bool Remove( string name )
Public Function Remove ( name As String ) As Boolean Dim instance As AFNamedCollection Dim name As String Dim returnValue As Boolean returnValue = instance.Remove(name)
public: virtual bool Remove( String^ name ) sealed
abstract Remove : name : string -> bool override Remove : name : string -> bool
Parameters
- name
- Type: SystemString
The collection member name. It must be equal to the Name property of a member of the collection.
Return Value
Type: BooleanReturns if the item is successfully removed; otherwise, . This method also returns if name was not found in the original collection.
Implements
IAFNamedCollectionTRemove(String)
Remarks
This method removes the item from the collection with the specified name. 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.