Click or drag to resize

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.2.0
Syntax
public static void SwapValues<T>(
	this IList<T> source,
	int indexA,
	int indexB
)

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