# Sandbox.BaseInventoryComponent.HasItem

```csharp
bool HasItem()
```

Returns whether the inventory contains an item of the given type.

### Returns

`bool`

Declared in [Sandbox.BaseInventoryComponent](/api/Sandbox.BaseInventoryComponent).
Assembly: `Sandbox.Engine`.
