C# 6.0 Feature list
Feature | Example | C# | VB |
---|---|---|---|
Auto-property initializers | public int X { get; set; } = x; | Added | Exists |
Getter-only auto-properties | public int Y { get; } = y; | Added | Added |
Ctor assignment to getter-only autoprops | Y = 15 | Added | Added |
Parameterless struct ctors | Structure S : Sub New() : End Sub : End Structure | Added | Added |
Using static members | using System.Console; … Write(4); | Added | Exists |
Dictionary initializer | new JObject { ["x"] = 3, ["y"] = 7 } | Added | No |
Await in catch/finally | try … catch { await … } finally { await … } | Added | No |
Exception filters | catch(E e) if (e.Count > 5) { … } | Added | Exists |
Partial modules | Partial Module M1 | N/A | Added |
Partial interfaces | Partial Interface I1 | Exists | Added |
Multiline string literals | "Hello<newline>World" | Exists | Added |
Year-first date literals | Dim d = #2014-04-03# | N/A | Added |
Line continuation comments | Dim addrs = From c in Customers ' comment | N/A | Added |
TypeOf IsNot | If TypeOf x IsNot Customer Then … | N/A | Added |
Expression-bodied members | public double Dist => Sqrt(X * X + Y * Y); | Added | No |
Null propagation | customer?.Orders?[5]?.$price | Added | Added |
String interpolation | $"{p.First} {p.Last} is {p.Age} years old." | Added* | Planned |
nameof operator | string s = nameof(Console.Write); | Added* | Planned |
#pragma | #Disable Warning BC40008 | Added | Added |
Smart name resolution | N/A | Added | |
ReadWrite props can implement ReadOnly | Exists | Added | |
#region inside methods | Exists | Added | |
Overloads inferred from Overrides | N/A | Added | |
CObj in attributes | Exists | Added | |
CRef and parameter name | Exists | Added | |
Extension Add in collection initializers | Added | Exists | |
Improved overload resolution | Added | N/A |
C# 6.0 Feature list的更多相关文章
- redis3.0配置文件详解
redis.conf #redis.conf # Redis configuration file example. # ./redis-server /path/to/redis.conf #### ...
- Git学习笔记(6)——Bug和Feature分支
本文主要记录了通过Git来调试Bug和添加新的功能,也就是Bug分支和Feature分支,以及分支的推送. Bug分支 通过Git,我们可以为每个Bug建立一个分支,Bug修复后,合并分支,然后将临时 ...
- redis3.0.7集群部署手册
1.用root登录主机2.将redis-3.0.7.tar.gz传送到主机3.将rubygems-update-2.5.2.gem,redis-3.0.0.gem传送到主机4.解压redis-3.0. ...
- Install OpenCV 3.0 and Python 2.7+ on OSX
http://www.pyimagesearch.com/2015/06/15/install-OpenCV-3-0-and-Python-2-7-on-osx/ As I mentioned las ...
- redis-4.0.8 配置文件解读
# Redis configuration file example.## Note that in order to read the configuration file, Redis must ...
- 009-docker-安装-redis:5.0.3
1.搜索镜像 docker search redis 2.拉取合适镜像 docker pull redis:5.0.3 docker images 3.使用镜像 docker run -p 6379: ...
- 关于微博开放平台Oauth2.0接入网站应用
关于什么是微博开放平台及微博开放平台能做什么,咱就不做搜索引擎的搬运工了 这里直接给个链接介绍:微博开放平台 本文只是抛砖引玉,讲讲微博开放平台的基本用法,适合没接触过开放平台的朋友入门学习,老鸟就略 ...
- redis5.0主从配置
1.下载 wget http://download.redis.io/releases/redis-5.0.3.tar.gz .tar.gz cd redis- make make test //检查 ...
- MyEclipse WebSphere开发教程:安装和更新WebSphere 6.1, JAX-WS, EJB 3.0(一)
你开学,我放价!MyEclipse线上狂欢继续!火热开启中>> [MyEclipse最新版下载] MyEclipse支持Java EE技术(如JAX-WS和EJB 3.0),它们以功能包的 ...
随机推荐
- EditPlus 3.7.164 中文版(4月3日更新)
新的版本汉化了之前无法汉化的部分内容,并修复了旧汉化版的部分问题. 欢迎下载新的翻译文件.
- python与ruby的差别
1.引用文件差别 Ruby:同一目录下的文件,如/usr/local/ruby/foo.rb与/usr/local/ruby/bar.rb两个文件.如果直接在foo.rb中 require 'bar' ...
- Xcode 7 PCH宏文件的配置和使用---学会使用宏定义
使用宏的目的是什么? 由于实际开发中,有时候一些设置信息需要重复使用(例如设置打印信息.配置颜色.配置宽度等),如果每次都手动去敲每次都去创建会很麻烦.虽然宏使用的时候会占用内存,可是目前来说大部分开 ...
- WebLogic集群体系架构
WebLogic Server集群概述 WebLogic Server 群集由多个 WebLogic Server 服务器实例组成,这些服务器实例同时运行并一起工作以提高可缩放性和可靠性.对于客户端 ...
- js图片左右旋转
图片显示 <p> <a href="images/example2.jpg" rel="lightbox-group" title=" ...
- Java8函数式编程
在Java8的 java.util.function中包含以下几个接口 1.Function,先上源码 /* * Copyright (c) 2010, 2013, Oracle and/or its ...
- sql获取时间
SELECT CONVERT(varchar(10), getdate(), 120)--当前年月日,Example:2013-11-19 SELECT CONVERT(varchar(10), ge ...
- command 'x86_64-linux-gnu-gcc' failed with exit status 1错误及解决方案
Ubuntu16.04安装Scrapy(pip install Scrapy)时提示错误如下: Failed building wheel for cryptography Running setup ...
- Java-坦克大战
利用Java语言中的集合.Swing.线程等知识点编写一个坦克大战游戏.(1) 画出敌我坦克的原理:在坦克类里面有一个布尔类型变量good.用于判断坦克的阵营,在创建坦克对象时在Tank类的构造方法中 ...
- LBWE更新模式切换问题:缓存清理
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...