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

AF SDK Reference

AFCollection(T).Clear Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFCollection(T).Clear Method
Removes all items from the collection.

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

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

IListClear
ICollectionTClear

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.

Version Information

AFSDK


See Also

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