# Sandbox.BaseInventoryComponent.GetItem

```csharp
T GetItem()
```

Returns the first item of the given type in the inventory (lowest slot wins), or null.

### Returns

`T`

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
