zoukankan      html  css  js  c++  java
  • C# 各版本更新简介

    经常在不同版本的.net framework下作业.于是乎想了解下,.net下各版本C#的新特性.

    ----------

    C#2.0  针对于.net framework 2.0 新特性有:

     分部类

     泛型

     静态类

     迭代器

     匿名方法

     委托的协变和逆变

     属性访问器可以被单独设置访问级别

     可空类型

     ??操作符 ==>如果不为空返回自身,如果为空则返回之后的操作  nullObj??obj;

    -----------

    C# 3.0 针对于.net framework 3.5 新特性有:

     Linq

     类初始化器

     匿名类型 var x = new {Name="pp"};

     局部变量类型推断 var

     lambda表达式

     自动化属性

     扩展方法

     分部方法

     -----------

    C# 4.0 新特性:

     具名可选参数

     泛型的协变和逆变

    --------------------------------------

    .NET Framework 几个版本发布时间及对应 VS

    版本       版本号                   发布时间               Visual Studio         Windows 内置

    1.0         1.0.3705.0             2002-02-13        Visual Studio.NET 

    1.1         1.1.4322.573         2003-04-24        Visual Studio 2003  Windows Server 2003

    2.0         2.0.50727.42         2005-11-07        Visual Studio 2005 

    3.0         3.0.4506.30           2006-11-06                                         Windows Vista, Windows Server 2008

    3.5         3.5.21022.8           2007-11-19        Visual Studio 2008   Windows 7, Windows Server 2008 R2

    4.0         4.0.30319.1           2010-04-12        Visual Studio 2010 

    4.5         4.5.40805.17020   2011-09-20        Visual Studio 2011

    ---------------------------------------

     .net framework版本与CLR之间的关系:

    .net framework 2.0 = CLR 2.0 + FCL(framework class library) .net framework 3.0 = .net framework 2.0 + SP1 + WPF + WCF + WF + CardSpace .net framework 3.5 = .net framework 3.0 + SP2 + new compiler

     这三个版本framework的CLR都是2.0

     .NET Framework 4.0。那么框架4.0对应的CLR版本是4.0

  • 相关阅读:
    scrapy中selenium的应用
    Django的锁和事务
    redis
    【leetcode】187. Repeated DNA Sequences
    【leetcode】688. Knight Probability in Chessboard
    【leetcode】576. Out of Boundary Paths
    【leetcode】947. Most Stones Removed with Same Row or Column
    【leetcode】948. Bag of Tokens
    【leetcode】946. Validate Stack Sequences
    【leetcode】945. Minimum Increment to Make Array Unique
  • 原文地址:https://www.cnblogs.com/zhangchenliang/p/3728886.html
Copyright © 2011-2022 走看看