SlideShare a Scribd company logo
ligaoren@gmail.com
假如给你一次机会从零开始学习.net,
你还会使用同样的方法么?
.net framework from 1.0 -> 4.0
第一个问题:你是用什么做开发的?
• C# 1.0 / 2.0 / 3.0 / 4.0
• Vs2005 VS2008 VS2010
• .net Framework 2.0 /3.0 / 4.0
1.0   1.1   2.0   3.0   3.5   4.0
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
• 这些年.net到底发生了哪些变化?
• 这些变化有什么规律吗?
• 除了语法糖我们还能关注些什么?
.NET Framework的设计目标是什么?
1.减少语法噪音
• 完成目标功能语法本身代码量所占比例
• 这部分改进多数被我们当作语法糖
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
2.惯用法实现
• 多数人都会采用的惯用法,会逐渐迁移到框
  架内实现
• 例如:
 – TryParse
 – int? default()
 – EventHandler<T>
• 惯用法的实现职责从开发人员转移到框架,
  往往也会降低代码量
3.类库功能增强
•   常用功能逐渐加入到类库中
•   List<T>.FindAll
•   Stringbuilder.Clear();
•   String.Join
•   Collection类库每一个版本都在变化

• 这种变化比较零散,需要我们BCL有一个持续
  的关注
•
4.编程范式
• 2.0 泛型编程
• 3.0 函数式编程
• 4.0 并行编程 dynamic
5.设计模式
• 设计模式本质上是弥补面向对象语言的不
  足
• 如果语言本身支持,何必重新发明轮子?
 – Lazy<T>
 – Event
 – Iterator
6.产品级通用解决方案
•   LINQ
•   EF
•   TPL
•   Rx
7.项目开发支持
• Code Behind
• Partial Class
• Namespace alia
.net framework from 1.0 -> 4.0
OOP设计原则
 SRP-SoC
   OCP
   DIP
  DI/IoC
   KISS
   DRP
This page intentionally left blank
•
泛型Generics
迭代器Iterators
局部类partial
TryParse()
• 属性访问修饰符access modifiers on getters and setters
• 匿名方法anonymous methods.
//declare a method with no name and convert it into a delegate.
• 后台工作进程background worker pattern
• 泛型约束 Generics Constraints
•
    最令你吃惊的事实是什么?


    人生只有900个月
    .net framework 2.0才有静态类
•   C#
     –   default()
     –   System.EventHandler<T>
     –   System.Collections.Generic.List<T> FindAll()
     –   General Catch Block
     –   Nullable Modifier int?
     –   contravariance & covariance
•   Product
     –   Ado.net
     –   Asp.net



•   What's New in the .NET Framework Version 2.0
•   http://msdn.microsoft.com/en-us/library/t357fb32.aspx

•   Breaking Changes in .NET Framework 2.0
•   http://msdn.microsoft.com/zh-cn/netframework/aa570326.aspx
.net framework from 1.0 -> 4.0
•   3.0
.net framework from 1.0 -> 4.0
•
.net framework from 1.0 -> 4.0
匿名类型anonymous types
自动属性   automatically implemented properties
集合初始化   Collection Initializers
对象初始化   Object Initializer
扩展方法   Extension methods
LINQ
无参匿名方法   Parameterless Anonymous Methods
Lambda表达式

Expression Trees
.net framework from 1.0 -> 4.0
TPL & Parallel loops
dynamic
Optional parameters
Tuple
Func & Action
.net framework from 1.0 -> 4.0
•
持续关注,坚持练习




     我曾认为用手槌要六百年才能掘通的隧道

     安迪用不到二十年就办到了



• 10000个小时的练习,成为技术专家
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0

More Related Content

Viewers also liked (20)

PPT
Inside .net framework
Faisal Aziz
 
PPT
Architecture of .net framework
Then Murugeshwari
 
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
PPT
Introduction to .NET Framework
Raghuveer Guthikonda
 
PPT
.NET Framework Overview
Doncho Minkov
 
PPSX
Introduction to .net framework
Arun Prasad
 
PDF
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
PPTX
Building Office 365 solutions with React
Waldek Mastykarz
 
PPTX
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
Antonio Chagoury
 
PPT
.net framework
Ram Sagar Mourya
 
PPT
.Net framework
Om Vikram Thapa
 
PPTX
Introduction to .net FrameWork by QuontraSolutions
Quontra Solutions
 
PPTX
Introduction to .NET Framework
Małgorzata Borzęcka
 
PPTX
Beyond Gamification: designing the player journey
Amy Jo Kim
 
PPTX
Using MongoDB with the .Net Framework
Stefano Paluello
 
PPTX
Introduction of .net framework
Prognoz Technologies Pvt. Ltd.
 
PPTX
Find out Which Versions of the .NET Framework are Installed on a PC.
raj upadhyay
 
KEY
Using The .NET Framework
LearnNowOnline
 
PPTX
.Net framework
Gracia Marcom
 
PPT
Владимир Никонов "Вызовы при разработке enterprise продукта"
Fwdays
 
Inside .net framework
Faisal Aziz
 
Architecture of .net framework
Then Murugeshwari
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
Introduction to .NET Framework
Raghuveer Guthikonda
 
.NET Framework Overview
Doncho Minkov
 
Introduction to .net framework
Arun Prasad
 
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Building Office 365 solutions with React
Waldek Mastykarz
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
Antonio Chagoury
 
.net framework
Ram Sagar Mourya
 
.Net framework
Om Vikram Thapa
 
Introduction to .net FrameWork by QuontraSolutions
Quontra Solutions
 
Introduction to .NET Framework
Małgorzata Borzęcka
 
Beyond Gamification: designing the player journey
Amy Jo Kim
 
Using MongoDB with the .Net Framework
Stefano Paluello
 
Introduction of .net framework
Prognoz Technologies Pvt. Ltd.
 
Find out Which Versions of the .NET Framework are Installed on a PC.
raj upadhyay
 
Using The .NET Framework
LearnNowOnline
 
.Net framework
Gracia Marcom
 
Владимир Никонов "Вызовы при разработке enterprise продукта"
Fwdays
 

Similar to .net framework from 1.0 -> 4.0 (11)

PPT
C#语言的演化
TerabyteX
 
PPTX
Training i:.net 3.5 & c# 3.0 & linq
powerzhuye
 
PPT
Uml面向对象的分析与设计
xunhao
 
PDF
Linq 入门
greenerycn
 
PDF
第1讲 开始编写程序
ruandao
 
PPT
Abap oo
vernoo
 
PPTX
N-layer design & development
Xuefeng Zhang
 
PPTX
保哥線上講堂:LINQ 快速上手
Will Huang
 
PDF
Real World ASP.NET MVC
jeffz
 
DOC
上海立派信息技术有限公司
yiditushe
 
PPTX
Asp.net 介绍
yifeng
 
C#语言的演化
TerabyteX
 
Training i:.net 3.5 & c# 3.0 & linq
powerzhuye
 
Uml面向对象的分析与设计
xunhao
 
Linq 入门
greenerycn
 
第1讲 开始编写程序
ruandao
 
Abap oo
vernoo
 
N-layer design & development
Xuefeng Zhang
 
保哥線上講堂:LINQ 快速上手
Will Huang
 
Real World ASP.NET MVC
jeffz
 
上海立派信息技术有限公司
yiditushe
 
Asp.net 介绍
yifeng
 
Ad

.net framework from 1.0 -> 4.0