---
title: "Layer..::.SwapObjects Method (Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_WinControls_Layer_SwapObjects_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/)

# Layer.SwapObjects Method (Int32, Int32)
 
Swaps the v-objects specified by their indices inside the layer (changes the z-order).
 
**Namespace:** [Aurigma.GraphicsMill.WinControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.WinControls.VectorObjects (in Aurigma.GraphicsMill.WinControls.VectorObjects.dll)
 
## Syntax
  
```
Public Sub SwapObjects ( _index0 As Integer, _index1 As Integer _
)
```
 
```csharp
public void SwapObjects(int index0,int index1
)
```
 
### Parameters
 
 - index0
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
The index of the first object to swap.

 - index1
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
The index of the second object to swap.
   
## See Also

### Reference

- [Layer Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_WinControls_Layer.htm.md)
- [SwapObjects Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_WinControls_Layer_SwapObjects.htm.md)
- [Aurigma.GraphicsMill.WinControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_WinControls.htm.md)
