AFCollection(T).Clear Method
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
Removes all items from the collection.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7
Syntax
public void Clear()
Public Sub Clear Dim instance As AFCollection instance.Clear()
public: virtual void Clear() sealed
abstract Clear : unit -> unit override Clear : unit -> unit
Implements
IListClearICollectionTClear
Remarks
If the items in the collection support the IAFSecurable interface, then all items are removed from the collection which have the Delete security rights. Otherwise, all items are removed from the collection and the collection's Count is set to zero. References to other objects from items of the collection are also released.
This method is an O(n) operation, where n is Count.