This file contains hidden or 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
// Take the first 3 items from list 'list' and create a new list with them | |
var shortList = list.Take(3).ToList(); |
This file contains hidden or 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
var list = new List<string>() {"Asia", "Africa", "North America", "South America", "Antartica", "Europe", "Australia"}; | |
// Get all the items from the list that start with | |
// an 'A' and have 'r' as the 3rd character | |
var filteredList = list.Where(item => item.StartsWith("A")).Where(item => item[2] == 'u').ToList(); |
This file contains hidden or 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
SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = 'email' ) | |
SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name like '%PART_OF_NAME%' ) |
NewerOlder