> For the complete documentation index, see [llms.txt](https://zamberetta.gitbook.io/auctus-class-library/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zamberetta.gitbook.io/auctus-class-library/reference/common/data-types/bool-extensions/toint.md).

# ToInt()

Converts the boolean representation to an integer.

{% code title="Declaration" %}

```csharp
public static int ToInt(this bool value)
```

{% endcode %}

<pre class="language-csharp" data-title="Example"><code class="lang-csharp">false.ToInt();
<strong>true.ToInt();
</strong></code></pre>

{% code title="Result" %}

```csharp
0
1
```

{% endcode %}
