https://msdn.microsoft.com/en-us/library/hh156499(v=vs.140).aspx

This page lists key feature names for each version of C# with descriptions of the new and enhanced features in the lastest version of the language.

Previous Versions

C# 1, Visual Studio .NET 2002

First release

C# 1.1, Visual Studio .NET 2003

#line pragma and xml doc comments

C# 2, Visual Studio .NET 2005

Anonymous methods, generics, nullable types, iterators/yield, static classes, co/contra variance for delegates

C# 3, Visual Studio .NET 2008

Object and collection initializers, lambda expressions, extension methods, anonymous types, automatic properties, Language Integrated Query (LINQ), anonymous types, local var type inference, LINQ

C# 4, Visual Studio .NET 2010

Dynamic , named arguments, optional parameters, generic co/contra variance

C# 5, Visual Studio .NET 2012

Async / await, caller information attributes

Visual Studio .NET 2013

Bug fixes, performance improvements, and technology previews of .NET Compiler Platform (“Roslyn”)

C# 6, Visual Studio .NET 2015

Current version, see below

Current Version

nameof

You can get the unqualified string name of a type or member for use in an error message without hard coding a string. This allows your code to remain correct when refactoring. This feature is also useful for hooking up model-view-controller MVC links and firing property changed events.

String Interpolation

You can use string interpolation expressions to construct strings. An interpolated string expression looks like a template string that contains expressions. C# creates a string by replacing the expressions with the ToString represenations of the expressions’ results. An interpolated string is easier to understand with respect to arguments than Composite Formatting.

Null-conditional Member Access and Indexing

You can test for null in a very light syntactic way before performing a member access (?.) or index (?[]) operation. These operators help you write less code to handle null checks, especially for descending into data structures. If the left operand or object reference is null, the operations returns null.

Index Initializers

You can now initialize specific elements of a collection that supports indexing, such as initializing a dictionary.

Collection Initializer and Add Extension Methods

You can use initializers for collections now when the collection has an Add Extension method. Previously the Add method had to be an instance method.

Overload Resolution

The compiler has improved overload resolution that results in more code just working the way you would expect it to behave. One place where you might stop noticing a problem is when choosing between overloads taking nullable value types, or when passing method groups (instead of lambdas) to overloads that take delegates.

Exception Filters

You can use exception filers in catch clauses to determine whether a catch clause should handle the exception. Without this feature, you have to rethrow the exception, which clips the call stack reported in the rethrown exception.

Await in Catch and Finally Blocks

You can use await in catch and finally clauses.

Auto-property Initializers

You can initialize auto-properties now similarly to how you initialize fields.

Getter-only Auto-properites

You can define read-only auto-properties now without having to define a property with complete property syntax. You can initialize the property where you declare it or in the type’s constructor.

Function Members with Expression Bodies

You can declare members with expression-bodies of code in the same lightweight syntax you use with lambda expressions. See Methods (C# Programming Guide)Properties (C# Programming Guide)Indexers (C# Programming Guide), and Overloadable Operators (C# Programming Guide).

Using Static

You can im

C#6.0 VS2015的更多相关文章

  1. 使用Qt5.7.0 VS2015版本生成兼容XP的可执行程序 good(从VS2012 update1开始支持xp和c++11)

    一.直接使用VS2012/VS2013/VS2015生成XP兼容的可执行程序 Visual Studio刚发布时没打补丁,称为RTM版,之后会陆续发布补丁,进行bug修复和功能增强.VS2010及之前 ...

  2. 使用Qt5.7.0 VS2015版本生成兼容XP的可执行程序

    版权声明:本文为灿哥哥http://blog.csdn.net/caoshangpa原创文章,转载请标明出处. 一.直接使用VS2012/VS2013/VS2015生成XP兼容的可执行程序 Visua ...

  3. opencv3.2.0+opencv_contrib-3.2.0+vs2015开发配置

    在sift算法实现中,出现了这个问题 出现问题:\vs2015opencv\vs2015\project\mode\mode\sift算法1.cpp(3): fatal error C1083: 无法 ...

  4. opencv3.0+VS2015+64位win7配置

    首先,我们把所有用到的工具下载下来 VS2015         看这里,http://news.mydrivers.com/1/439/439398.htm,我下载的是专业版. OPENCV3.0 ...

  5. Windows8.1 + Nvidia cuda8.0 + Vs2015

    操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Vs2015 1.查看本机配置,查看显卡类型是否支持NVIDIA GPU选中计算机-->右键属性-->设备管理 ...

  6. WIN10-64+CUDA8.0+OpenCV3.0+VS2015配置

    在网上参考了各位前辈的攻略后,捣鼓了两天总算配置成功了. 目前网上多的还是ubuntu上配置CUDA的教程比较多比较详尽,但是我现在就是想在windows10上跑啊,就是想用CUDA啊... 1.CU ...

  7. OpenCV3.2.0+VS2015开发环境配置

    vs2015安装可参考:https://www.jianshu.com/p/391e67529bd3 OpenCV3.2.0配置可参考:https://www.jianshu.com/p/026093 ...

  8. OpenCV3.0 + VS2015出现“ACCESS_MASK不明确”错误

    问题:Vs 使用openCV 3.0+ 出错error C2872: “ACCESS_MASK”: 不明确的符号 环境: 系统:Win7 环境:VS2015 64bit 原因: 是因为我项目中的其中一 ...

  9. OpenCV学习笔记(一)——OpenCV3.1.0+VS2015开发环境配置

    摘要: 由于最近AR(增强现实)这个概念非常火爆,各种基于AR的应用及游戏逐渐面向大众,而在AR中最重要的两个技术就是跟踪识别和增强渲染,其中跟踪识别是通过OpenCV这个开源的计算机视觉库来实现的, ...

  10. system.net.httpclient 4.0 vs2015

    // 加入Cookie foreach (string a in cookieStr.Split(';')) { cookieContainer.Add(new Cookie(a.Split('=') ...

随机推荐

  1. ASP.NET 运行机制

    原本今天打算继续写ASP.NET MVC第四天的.但是由于里面涉及到asp.net运行机制的原理,如果不分析一下这里,mvc想说清楚还是挺困难的.既然要提到asp.net运行机制,所以打算还是说详细一 ...

  2. 敏捷开发之道(三)极限编程XP续

    上次的博文敏捷开发之道(二)极限编程XP中,我们了解了XP的实践中的其中四个,今天我们来一起学习一下剩余的实践. --接上文 5).结对编程 结对编程就是由结对的开发人员使用同一台电脑共同完成一项任务 ...

  3. Payment Terms 收付款条件和分期付款设置

    SAP Payment Terms 中文翻译为收付款条件,他的用途是应收和应付的财务凭证中账期的管理,顾名思义即手动录入和自动生成的财务文档多少天内冲销处理则为正常,否则为超期应收应付文档,它包含的内 ...

  4. WPFMediaKit照相功能

    最近写的一个WPF照相功能,往各位吐槽,提供优化 在WPF 设计器中添加如下代码 xmlns:wpfmedia="clr-namespace:WPFMediaKit.DirectShow.C ...

  5. 在ubuntu16.04 下安装haproxy 1.5.11 做tcp负载均衡

    由于haproxy需要FQ下载,所以从csdn下载了较为新版的haproxy1.5.11,安装过程如下: 1. 解压haproxy-1.5.11.tar.gz : tar xzvf haproxy-1 ...

  6. [转载]ASP.NET对路径"xxxxx"的访问被拒绝的解决方法小结

    异常详细信息: System.UnauthorizedAccessException: 对路径“D:/temp1/MyTest.txt”的访问被拒绝     在windows 2003下,在运行web ...

  7. ASP.NET WebAPI2 发布之后404 Note Found

    方法一:首先确保服务器安装.Net FrameWork 4.0 并且注册IIS 如果先安装.net framework4.0,再安装IIS,则会出现4.0的ISAPI没有注册的情况. 运行:C:\Wi ...

  8. java后台生成zip打包文件

    /** * * @param zipFile 压缩包文件对象 * @param listKey 压缩的图片物理地址 * @return */ public static boolean package ...

  9. jquery层居中,点击小图查看大图,弹出层居中代码

    1.层居中 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w ...

  10. .NET中数据集的强类型化

    我们知道,每一种程序设计语言都提供一定的类型检查,类型检查可以在编译时进行,也可以在运行时进行,分别称做静态类型检查和动态类型检查.由于静态类型的检查是在编译时进行,实现比较容易,能提高程序的运行效率 ...