IAFList.Contains Method (String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method determines whether the collection contains a specific item referenced by name.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
bool Contains( string name )
Function Contains ( name As String ) As Boolean Dim instance As IAFList Dim name As String Dim returnValue As Boolean returnValue = instance.Contains(name)
bool Contains( String^ name )
abstract Contains : name : string -> bool
Parameters
- name
- Type: SystemString
The name of the item to locate in the collection.
Return Value
Type: BooleanReturns if the item was found in the collection; otherwise, is returned.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The name parameter is . |
Remarks
This method approaches an O(1) operation.