c# 各个版本

摘要:
C#1.0C#1.0于2002年发布,包含了面向静态类型目标的现代语言的所有重要功能,您将看到从2到6的所有章节。C#2.0C#2.0于2005年发布,并着重于

C# 1.0
C# 1.0 was released in 2002 and included all the important features of a statically typed object-
oriented modern language, as you will see throughout chapters 2 to 6.

C# 2.0
C# 2.0 was released in 2005 and focused on enabling strong data typing using generics,
to improve code performance and reduce type errors, including the topics listed in the
following table:
Feature Chapter Topic
Nullable value types 2 Making a value type nullable
Generics 6 Making types more reusable with generics

C# 3.0
C# 3.0 was released in 2007 and focused on enabling declarative coding with Language
INtegrated Queries (LINQ) and related features like anonymous types and lambda
expressions, including the topics listed in the following table:
Feature Chapter Topic
Implicitly typed local variables 2 Inferring the type of a local variable
LINQ 12 All topics in Chapter 12, Querying and Manipulating

Data Using LINQ

C# 4.0
C# 4.0 was released in 2010 and focused on improving interoperability with dynamic languages
like F# and Python, including the topics listed in the following table:
Feature Chapter Topic
Dynamic types 2 The dynamic type
Named/optional arguments 5 Optional parameters and named arguments

C# 5.0
C# 5.0 was released in 2012 and focused on simplifying asynchronous operation support
by automatically implementing complex state machines while writing what looks like
synchronous statements, including the topics listed in the following table:
Feature Chapter Topic
Simplified asynchronous tasks 13 Understanding async and await

C# 6.0
C# 6.0 was released in 2015 and focused on minor refinements to the language, including the
topics listed in the following table:
Feature Chapter Topic
Static imports 2 Simplifying the usage of the console
Interpolated strings 2 Displaying output to the user
Expression bodied members 5 Defining read-only properties

C# 7.0
C# 7.0 was released in March 2017 and focused on adding functional language features like
tuples and pattern matching, as well as minor refinements to the language, including the topics
listed in the following table:

Feature Chapter Topic
Binary literals and digit separators 2 Storing whole numbers
Pattern matching 3 Pattern matching with the if statement
out variables 5 Controlling how parameters are passed
Tuples 5 Combining multiple values with tuples
Local functions 6 Defining local functions

C# 7.1
C# 7.1 was released in August 2017 and focused on minor refinements to the language,
including the topics listed in the following table:
Feature Chapter Topic
Default literal expressions 5 Setting fields with default literal
Inferred tuple element names 5 Inferring tuple names
async Main 13 Improving responsiveness for console apps

C# 7.2
C# 7.2 was released in November 2017 and focused on minor refinements to the language,
including the topics listed in the following table:
Feature Chapter Topic
Leading underscores in numeric literals 2 Storing whole numbers
Non-trailing named arguments 5 Optional parameters and named arguments
private protected access modifier 5 Understanding access modifiers
You can test == and != with tuple types 5 Comparing tuples

C# 7.3
C# 7.3 was released in May 2018 and focused on performance-oriented safe code that improves
ref variables, pointers, and stackalloc. These are advanced and rarely needed for most
developers, so they are not covered in this book.

C# 8.0
C# 8.0 was released in September 2019 and focused on a major change to the language related
to null handling, including the topics listed in the following table:

Feature Chapter Topic
Nullable reference types 2 Making a reference type nullable
Switch expressions 3 Simplifying switch statements with switch expressions
Default interface methods 6 Understanding default interface methods

C# 9.0
C# 9.0 was released in November 2020 and focused on record types, refinements to pattern
matching, and minimal-code console apps, including the topics listed in the following table:
Feature Chapter Topic
Minimal-code console apps 1 Top-level programs
Enhanced pattern matching 5 Pattern matching with objects
Records 5 Working with records

免责声明:文章转载自《c# 各个版本》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇CAA工程创建VimDiff技巧下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

MySQL导入utf8编码的CSV文件

首先,作为测试,我们在这里创建一个名为testdb的数据库,和一个名为test_table的表: create database if not exists testdb default charset utf8 collate utf8_general_ci; use testdb; drop table if exists test_table; cr...

java 如何在pdf中生成表格

1、目标   在pdf中生成一个可变表头的表格,并向其中填充数据。通过泛型动态的生成表头,通过反射动态获取实体类(我这里是User)的get方法动态获得数据,从而达到动态生成表格。   每天生成一个文件夹存储生成的pdf文件(文件夹的命名是年月日时间戳),如:20151110   生成的文件可能在毫秒级别,故文件的命名规则是"到毫秒的时间戳-uuid",如...

FlinkSQL源码阅读-schema管理

在Flink SQL中, 元数据的管理分为三层: catalog-> database-> table, 我们知道Flink SQL是依托calcite框架来进行SQL执行树生产,校验,优化等等, 所以本文讲介绍FlinkSQL是如何来结合Calcite来进行元数据管理的. calcite开放的接口 public interface Schem...

MySQL的锁(1)

    锁机制是数据库系统区别于文件系统的一个关键特性,他可以确保用户能以一致的方式读取和修改数据。     为了保证一致性,必须有锁的介入。MySQL操作缓冲池中的LRU列表,删除、添加、移动LRU列表中的元素等地方也都适用锁,从而允许对多种不同资源的并发访问。     打个比方,我们到淘宝上买一件商品,商品只有一件库存,这个时候如果还有另一个人买,那么...

Vue笔记:Vue3 Table导出为Excel

1、安装 npm install -S file-saver 用来生成文件的web应用程序 npm install -S xlsx 电子表格格式的解析器 npm install -D script-loader 将js挂载在全局下npm install -S element-ui...

索引长度过长 ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

1.发现问题  今天在修改innodb表的某个列的长度时,报如下错误:   [html]view plaincopy  print? alter table test2 modify column id varchar(500);   ERROR 1071 (42000): Specified key was too long; max key ...