IListExtensionMethodsSwapValuesT Method |
Swaps the values at indexA and indexB.
Namespace:
SD.Tools.BCLExtensions.CollectionsRelated
Assembly:
SD.Tools.BCLExtensions (in SD.Tools.BCLExtensions.dll) Version: 1.1.1
Syntax public static void SwapValues<T>(
this IList<T> source,
int indexA,
int indexB
)
<ExtensionAttribute>
Public Shared Sub SwapValues(Of T) (
source As IList(Of T),
indexA As Integer,
indexB As Integer
)
Parameters
- source
- Type: System.Collections.GenericIListT
The source. - indexA
- Type: SystemInt32
The index for A. - indexB
- Type: SystemInt32
The index for B.
Type Parameters
- T
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also