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

AF SDK Reference

PIDatabaseSecurities.IndexOf Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
PIDatabaseSecurities.IndexOf Method
Searches for the specified object and returns the zero-based index of the first occurrence within the entire collection.

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

Syntax

public int IndexOf(
	PIDatabaseSecurity item
)
Public Function IndexOf ( 
	item As PIDatabaseSecurity
) As Integer

Dim instance As PIDatabaseSecurities
Dim item As PIDatabaseSecurity
Dim returnValue As Integer

returnValue = instance.IndexOf(item)
public:
virtual int IndexOf(
	PIDatabaseSecurity^ item
) sealed
abstract IndexOf : 
        item : PIDatabaseSecurity -> int 
override IndexOf : 
        item : PIDatabaseSecurity -> int 

Parameters

item
Type: OSIsoft.AF.PIPIDatabaseSecurity
The object to locate in the collection. The value can be for reference types.

Return Value

Type: Int32
The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.

Implements

IListTIndexOf(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.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

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