Created
June 12, 2014 17:51
-
-
Save Redth/0462027a0101f6fc4f68 to your computer and use it in GitHub Desktop.
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
| public class Person | |
| { | |
| public string FirstName { get; set; } | |
| public string LastName { get; set; } | |
| public int Age { get;set; } | |
| } | |
| var people = new List<Person> { | |
| new Person { FirstName = "Bill", LastName = "Smith", Age = 60 }, | |
| new Person { FirstName = "Jane", LastName = "Doe", Age = 41 }, | |
| new Person { FirstName = "Joe", LastName = "Schmoe", Age = 24 } | |
| } | |
| foreach (var p in people.Where (p => p.Age >= 6)) | |
| Console.WriteLine ("{0} is old.", p.FirstName); | |
| var notJane = from p in people where FirstName != "Jane" select p; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment