---
title: "ListItemCollection..::.Swap Method (array&lt;IListItem&gt;[]()[], Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ListItemCollection_Swap_2_5390a9df.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 (IListItem[], Int32)
 
Shifts the specified elements 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 ( _items As IListItem(), _destinationIndex As Integer _
)
```
 
```csharp
public void Swap(IListItem[] items,int destinationIndex
)
```
 
### Parameters
 
 - items
     - Type:  [Aurigma.GraphicsMill.WinControls.IListItem](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IListItem.htm.md) []
An array of elements to shift.

 - destinationIndex
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
A position to which the items should be shifted.
 
## Remarks
  
This method swaps the elements so that the items 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)
