Version

Swap<T>(IList<T>,Int32,Int32) Method

Swaps values in a list at specified indexes.
Syntax
'Declaration
 
Public Shared Sub Swap(Of T)( _
   ByVal arr As IList(Of T), _
   ByVal x As Integer, _
   ByVal y As Integer _
) 
public static void Swap<T>( 
   IList<T> arr,
   int x,
   int y
)

Parameters

arr
The list to modify
x
Index location 1
y
Index location 2

Type Parameters

T
Type of elements in the list.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also