---
title: "ListItemCollection..::.Swap Method (Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ListItemCollection_Swap_2_22dcb54d.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)
 
Swaps two elements with the specified indices.
 
**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 ( _index0 As Integer, _index1 As Integer _
)
```
 
```csharp
public void Swap(int index0,int index1
)
```
 
### Parameters
 
 - index0
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
The index of the first element to swap.

 - index1
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
The index of the second element to swap.
   
## 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)
