---
title: "ListItemCollection..::.Swap Method (IListItem, IListItem)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_ListItemCollection_Swap_2_1ac436ed.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, IListItem)
 
Swaps two elements of the list.
 
**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 ( _item0 As IListItem, _item1 As IListItem _
)
```
 
```csharp
public void Swap(IListItem item0,IListItem item1
)
```
 
### Parameters
 
 - item0
     - Type: [Aurigma.GraphicsMill.WinControls.IListItem](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IListItem.htm.md)
The first element to swap.

 - item1
     - Type: [Aurigma.GraphicsMill.WinControls.IListItem](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_IListItem.htm.md)
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)
