Click or drag to resize

ListExtensionsSwapT Method

Swaps two elements in the specified list.

Namespace:  Ookii.Jumbo
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public static void Swap<T>(
	this IList<T> list,
	int index1,
	int index2
)

Parameters

list
Type: System.Collections.GenericIListT
The list.
index1
Type: SystemInt32
The first index.
index2
Type: SystemInt32
The second index.

Type Parameters

T
The type of the elements

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