# ForAll3

Testa se cada trio de elementos na mesma posição nas três coleções satisfaz a condição definida por `predicate`.

Esta função é interrompida assim que encontrar o primeiro trio de elementos que não satisfaça a condição informada.

> &#x20;**Atenção**&#x20;
>
> Este método causa a avaliação do [`IEnumerable<T>`](https://msdn.microsoft.com/pt-br/library/9eekhta0%28v=vs.110%29.aspx).

| Parâmetros                                                                                                                         | Retorno |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------- |
| <p>Func\<T, T2, T3, bool> predicate</p><p>IEnumerable\<T> source</p><p>IEnumerable\<T2> source2</p><p>IEnumerable\<T3> source3</p> | bool    |

## Como usar

&#x20;**Verificando se todos os valores das três coleções são iguais**&#x20;

```csharp
//IEnumerable<int> source =  { 4, 2, 6, 8, 10 }
//IEnumerable<int> source2 = { 4, 2 }
//IEnumerable<int> source3 = { 4, 2 }

bool result = 
    source.ForAll3(
        source2,
        source3, 
        (element1, element2,element3) => element1 == element2
                                      && element2 == element3);

//result = true
```

```csharp
//IEnumerable<int> source =  { 4, 2, 6, 8, 10 }
//IEnumerable<int> source2 = { 4, 2, 5 }
//IEnumerable<int> source3 = { 4, 2, 5 }

bool result = 
    source.ForAll3(
        source2,
        source3, 
        (element1, element2,element3) => element1 == element2
                                      && element2 == element3);

//result = false
```


---

# 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://gabriel-schade-cardoso.gitbook.io/tango-br/modulos/collection/forall3.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.
