Created
March 29, 2020 18:57
-
-
Save ncarandini/56fe734e604a49190deed39cd4b956d6 to your computer and use it in GitHub Desktop.
Solve the Giorgio Di Nardo quiz
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
void Main() | |
{ | |
List<Item> items = new List<UserQuery.Item> | |
{ | |
new Item { Id = 1, Nome = "Giorgio" }, | |
new Item { Id = 1, Nome = "Luca" }, | |
new Item { Id = 1, Nome = "Marco" }, | |
new Item { Id = 1, Nome = "Nicolò" } | |
}; | |
string[] elements = new string[] {"uc", "ni"}; | |
var foundItems = items.Where(i => elements.Any(e => i.Nome.ToUpper().Contains(e.ToUpper()))); | |
foundItems.Dump(); | |
} | |
// Define other methods and classes here | |
public class Item | |
{ | |
public int Id { get; set; } | |
public string Nome { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks