# Sandbox.Internal.SafeEncoder.GetByteCount

## Overload 1

```csharp
int GetByteCount(char[] chars, int index, int count, bool flush)
```

### Parameters

- `chars` (`char[]`)
- `index` (`int`)
- `count` (`int`)
- `flush` (`bool`)

### Returns

`int`

## Overload 2

```csharp
int GetByteCount(char* chars, int count, bool flush)
```

### Parameters

- `chars` (`char*`)
- `count` (`int`)
- `flush` (`bool`)

### Returns

`int`

## Overload 3

```csharp
int GetByteCount(System.ReadOnlySpan<char> chars, bool flush)
```

### Parameters

- `chars` (`System.ReadOnlySpan<char>`)
- `flush` (`bool`)

### Returns

`int`

Declared in [Sandbox.Internal.SafeEncoder](/api/Sandbox.Internal.SafeEncoder).
Assembly: `Sandbox.System`.
