# Toggle()

{% hint style="info" %}
Included since 📦**v1.0.0**
{% endhint %}

#### **Example**

```csharp
// Let's define a boolean variable setting it to true.
bool myBool = true;

// Invoking Toggle() negates the instance value.
myBool.Toggle();

// Value of 'myBool' is 'false' now.
```

#### **Equivalent to**

```csharp
myBool != myBool;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mx-pl.gitbook.io/extendedtypes-docs/boolean/toggle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
