PIPointList.IndexOf Method
- Last UpdatedSep 18, 2024
- PI System
- AF SDK 2024
- Developer
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156
Syntax
public int IndexOf( PIPoint item )
Public Function IndexOf ( item As PIPoint ) As Integer Dim instance As PIPointList Dim item As PIPoint Dim returnValue As Integer returnValue = instance.IndexOf(item)
public: virtual int IndexOf( PIPoint^ item ) sealed
abstract IndexOf : item : PIPoint -> int override IndexOf : item : PIPoint -> int
Parameters
- item
- Type: OSIsoft.AF.PI.PIPoint
The object to locate in the collection. The value can be null for reference types.
Return Value
Type: Int32The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.
Implements
IList<T>.IndexOf(T)
Remarks
The collection is searched forward starting at the first item and ending at the last item in the collection.
This method determines equality using the default comparer Generic System.Collections.Generic.Comparer.Default. This comparer checks whether type T implements Generic System.IComparable and uses that implementation if available. If not, this comparer checks whether type T implements System.IComparable. If type T does not implement either interface, this method uses Equals(Object).
This method performs a linear search; therefore, the average execution time is proportional to Count. That is, this method is an O(n) operation, where n is Count.