Click or drag to resize
IListExtensionMethods.SwapValues<T> Method
Swaps the values at indexA and indexB.

Namespace: SD.Tools.BCLExtensions.CollectionsRelated
Assembly: SD.Tools.BCLExtensions (in SD.Tools.BCLExtensions.dll) Version: 1.0.0.0 (1.0.10.1127)
Syntax
public static void SwapValues<T>(
	this IList<T> source,
	int indexA,
	int indexB
)

Parameters

source
Type: System.Collections.Generic.IList<T>
The source.
indexA
Type: System.Int32
The index for A.
indexB
Type: System.Int32
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 IList<T>. 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