PIServers.Item Property (Int32)
- Last UpdatedJan 12, 2026
- 2 minute read
- PI System
- AF SDK 3.2.0
- Developer
Gets or sets the item at the specified index.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.2.0.7
Syntax
public PIServer this[ int index ] { get; }
Public ReadOnly Default Property Item ( index As Integer ) As PIServer Get Dim instance As PIServers Dim index As Integer Dim value As PIServer value = instance(index)
public: property PIServer^ default[int index] { PIServer^ get (int index); }
member Item : PIServer with get
Parameters
- index
- Type: SystemInt32
The zero-based index of the item to get or set.
Property Value
Type: PIServerThe item at the specified index.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | index is less than zero or is equal to or greater than Count. |
| NotSupportedException | The collection is read-only when attempting to set the item. |
| ArgumentNullException | The value was when attempting to set the item. |
Remarks
The collection does not accept as a valid value and does allow duplicate items.
This property provides the ability to access a specific item in the collection by using the following syntax: myCollection[index].
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.