C# 9.0中的新增功能 - 译

https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9

What's new in C# 9.0
C# 9.0中的新增功能

features and enhancements
特征和增强特征

Records
记录

Init only setters
仅限Init的资源库

Top-level statements
顶级语句

Pattern matching enhancements
模式匹配增强

Native sized integers
本机大小的整数

native
a:本地,天然

Function pointers
函数指针

Suppress emitting localsinit flag
禁止发出localsinit标志

suppress
v:压制,取缔,遏制

emit
v:发射,发出,放出,发表,发行

Target-typed new expressions
目标类型的新表达式

static anonymous functions
静态匿名函数

anonym
n:假名,无名氏

Target-typed conditional expressions
目标类型的条件表达式

Covariant return types
协变返回类型

Extension GetEnumerator support for foreach loops
扩展GetEnumerator支持foreach循环

Lambda discard parameters
Lambda弃元参数

Attributes on local functions
本地函数的属性

Module initializers
模块初始值设定项

New features for partial methods
分部方法的新特征

Partial Method 
分部方法; 局部方法;  

partial
n:片,偏,偏流

C# 9.0 is supported on .NET 5. 
.NET 5 支持 C# 9.0。

C# language versioning
C#语言版本控制

introduces record types
引入了记录类型

introduce
v:介绍,引进,提出,引入,采用

reference type
引用类型

synthesized methods
合成方法

synthesize
v:合成,综合

value semantics
值语义

semantics
n:语义学,语义

Records are immutable
记录是不可变的

immutable
adj. 不可改变的; 永恒不变的;   
[例句]Nothing in the world is immutable.
世界没有一成不变的东西。

create immutable reference types
创建不可变的引用类型

classes and anonymous types
类和匿名类型

structs and tuples
结构和元组

a copy of the original data
原始数据的副本

when value types are passed to methods
将值类型传递给方法时

concurrent programs with shared data
共享数据的并发程序

concurrent programs
并发程序; 并行程序;  

concurrent
n:竞争者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值