Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private IEnumerable<string> nomes = new List<string>(){ "Uilque", "Lucas", "Luiz", "João", "Pedro", "Antônio" };
public IEnumerable<string> NomesGrandesEmCaixaAltaOrdenados1()
var nomesGrandesEmCaixaAlta = from n in nomes.Where(n => n.Length > 5)
orderby n
select n.ToUpper();
return nomesGrandesEmCaixaAlta;
public IEnumerable<string> NomesGrandesEmCaixaAltaOrdenados2()
var nomesGrandesEmCaixaAlta = (from n in nomes.Where(n => n.Length > 5)
select n.ToUpper()
).OrderBy(n => n);
return nomesGrandesEmCaixaAlta;
public IEnumerable<string> NomesGrandesEmCaixaAltaOrdenados3()
var nomesGrandesEmCaixaAlta = (from n in nomes
where n.Length > 5
select n
).OrderBy(n => n)
.Select(n => n.ToUpper());
return nomesGrandesEmCaixaAlta;
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.