# Sandbox.BaseInventoryComponent.MoveSlot

```csharp
void MoveSlot(int fromSlot, int toSlot)
```

Moves the item in `fromSlot` to `toSlot`, swapping if the
destination is occupied. Routed through the host.

### Parameters

- `fromSlot` (`int`)
- `toSlot` (`int`)

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
