Created
May 17, 2016 18:12
-
-
Save uqmessias/6a3e0daa0e058b4c959144ecda2d87b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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