> For the complete documentation index, see [llms.txt](https://gabriel-schade-cardoso.gitbook.io/tango-br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gabriel-schade-cardoso.gitbook.io/tango-br/modulos/collection/iterate.md).

# Iterate

Aplica a função `action` em cada elemento da coleção.

> &#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>Action\<T> action</p><p>IEnumerable\<T> source</p> | void    |

## Como usar

&#x20;**Escrevendo todos os elementos no console**&#x20;

```csharp
//IEnumerable<string> source = { "Hello", " ", "Tango" }

source.Iterate( value => Console.Write(value) );

//"Hello Tango"
```
