---
title: "ListItemCollection..::.Swap Method (array&lt;Int32&gt;[]()[], Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ListItemCollection_Swap_2_c1759297.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# ListItemCollection.Swap Method (Int32[], Int32)
 
Shifts elements with the specified indices to a specific position.
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)
 
## Syntax
  
```
Public Sub Swap ( _indexes As Integer(), _destinationIndex As Integer _
)
```
 
```csharp
public void Swap(int[] indexes,int destinationIndex
)
```
 
### Parameters
 
 - indexes
     - Type:  [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d) []
An array of element indices to shift.

 - destinationIndex
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
A position to which the elements should be shifted.
 
## Remarks
  
This method swaps the elements so that the items with the indexes start with the destinationIndex.
   
## See Also

### Reference

- [ListItemCollection Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_ListItemCollection.htm.md)
- [Swap Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_ListItemCollection_Swap.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
