PIServers.RemoveAt Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Unregisters an existing PIServer by removing the entry from the list of known
PI Data Archive servers on the local machine.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void RemoveAt( int index )
Public Sub RemoveAt ( index As Integer ) Dim instance As PIServers Dim index As Integer instance.RemoveAt(index)
public: virtual void RemoveAt( int index ) sealed
abstract RemoveAt : index : int -> unit override RemoveAt : index : int -> unit
Parameters
- index
- Type: SystemInt32
Specifies the position number of a member of the collection. The range is between 0 and one less than the value of the collection's Count property.
Implements
IListTRemoveAt(Int32)IListRemoveAt(Int32)
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | This exception is thrown if an attempt is made to remove the last PIServer in the list. |
Remarks
This method is used to unregisters an existing PIServer entry from the list of
known PI Data Arhive servers on the local machine. This does not affect the configuration
of servers on other client computers.
| The last PIServer in the list is not allowed to be removed. |