# Set(int, bool)

> Sets the bit at an index to 0 or 1.

## Definition

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

```csharp
public void Set(int pos, bool value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the bit to set.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True for 1, false for 0.
