Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private List<string> nomeFuncionariosSede = new List<string>(){ "Uilque", "Lucas", "Luiz", "João" };
private List<string> nomeFuncionariosFiliais = new List<string>(){ "Maria", "Paula", "Pedro", "Antõnio"};
public void IterarEmDuasListasDoMesmoTipoComForeach()
{
foreach(string funcionario in nomeFuncionariosSede)
{
Console.WriteLine(funcionario);
}
foreach(string funcionario in nomeFuncionariosFiliais)
{
Console.WriteLine(funcionario);
}
}
public void IterarEmDuasListasDoMesmoTipoComLINQ()
{
foreach(string funcionario in nomeFuncionariosSede.Concat(nomeFuncionariosFiliais))
{
Console.WriteLine(funcionario);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.