第一章,C#开发的进化史
1、简单数据类型
2、排序
- Sorting an ArrayList using IComparer (C# 1)
- Sorting a List<Product> using IComparer<Product> (C# 2)
- Sorting a List<Product> using Comparison<Product> (C# 2)----Sort ,delegate instance,anonymous methods
View Code
- Sorting using Comparison<Product> from a lambda expression (C# 3)
View Code
- Ordering a List<Product> using an extension method (C# 3)---按照顺序获取内容,并不改变原有list的内容
View Code
整个演变图如下
3、查找和过滤
- Looping, testing, printing out (C# 1)-循环的同时,过滤并打印
View Code
- Separating testing from printing (C# 2)-测试和打印分开进行
View Code
View Code
- Testing with a lambda expression (C# 3)
View Code