# Sandbox.Internal.SafeEncoder.Convert

## Overload 1

```csharp
void Convert(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed)
```

### Parameters

- `chars` (`char[]`)
- `charIndex` (`int`)
- `charCount` (`int`)
- `bytes` (`byte[]`)
- `byteIndex` (`int`)
- `byteCount` (`int`)
- `flush` (`bool`)
- `out charsUsed` (`int`)
- `out bytesUsed` (`int`)
- `out completed` (`bool`)

## Overload 2

```csharp
void Convert(char* chars, int charCount, byte* bytes, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed)
```

### Parameters

- `chars` (`char*`)
- `charCount` (`int`)
- `bytes` (`byte*`)
- `byteCount` (`int`)
- `flush` (`bool`)
- `out charsUsed` (`int`)
- `out bytesUsed` (`int`)
- `out completed` (`bool`)

## Overload 3

```csharp
void Convert(System.ReadOnlySpan<char> chars, System.Span<byte> bytes, bool flush, out int charsUsed, out int bytesUsed, out bool completed)
```

### Parameters

- `chars` (`System.ReadOnlySpan<char>`)
- `bytes` (`System.Span<byte>`)
- `flush` (`bool`)
- `out charsUsed` (`int`)
- `out bytesUsed` (`int`)
- `out completed` (`bool`)

Declared in [Sandbox.Internal.SafeEncoder](/api/Sandbox.Internal.SafeEncoder).
Assembly: `Sandbox.System`.
