# Sandbox.SandboxSystemExtensions.BitsSet

```csharp
static int BitsSet(int i)
```

Returns the number of bits set in an integer. This us usually used for flags to count
the amount of flags set.

### Parameters

- `i` (`int`)

### Returns

`int`

Declared in [Sandbox.SandboxSystemExtensions](/api/Sandbox.SandboxSystemExtensions).
Assembly: `Sandbox.System`.
