# WriteRawBits(uint, int)

> Appends a specified number of bits to the data stream.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public bool WriteRawBits(uint value, int numbits)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The bits to write.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): A positive number of bytes to write.

### Returns

| Type                                                          | Description                      |
| ------------------------------------------------------------- | -------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Whether the write was successful |
