# ToInt()

{% 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 %}
