AFTimeRules.Swap Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Note: This API is now obsolete.
Swap the items in the collection by specified index.
Namespace: OSIsoft.AF.Time
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[BrowsableAttribute(false)] [ObsoleteAttribute("Child TimeRules are not supported.")] public void Swap( int firstIndex, int secondIndex )
<BrowsableAttribute(false)> <ObsoleteAttribute("Child TimeRules are not supported.")> Public Sub Swap ( firstIndex As Integer, secondIndex As Integer ) Dim instance As AFTimeRules Dim firstIndex As Integer Dim secondIndex As Integer instance.Swap(firstIndex, secondIndex)
public: [BrowsableAttribute(false)] [ObsoleteAttribute(L"Child TimeRules are not supported.")] void Swap( int firstIndex, int secondIndex )
[<BrowsableAttribute(false)>] [<ObsoleteAttribute("Child TimeRules are not supported.")>] member Swap : firstIndex : int * secondIndex : int -> unit
Parameters
- firstIndex
- Type: SystemInt32
The index into the collection of the first item in the collection to be swapped with the second item. - secondIndex
- Type: SystemInt32
The index into the collection of the second item in the collection to be swapped with the first item.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | If the size of the collection is too large to perform the operation. This occurs when the number of items in the collection is greater than a page size and the IsPaging property is . |
Remarks
The two items in the collection specified by the firstIndex
and secondIndex parameters are swapped. They exchange places
in the collection.
Version Information
AFSDK
Supported in: 2.5, 2.4Obsolete (compiler warning) in 3.1.1
Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9
Obsolete (compiler warning) in 2.8.5
Obsolete (compiler warning) in 2.8
Obsolete (compiler warning) in 2.7.5
Obsolete (compiler warning) in 2.7
Obsolete (compiler warning) in 2.6