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
本機大小的整數(shù)
native
a:本地,天然
Function pointers
函數(shù)指針
Suppress emitting localsinit flag
禁止發(fā)出localsinit標志
suppress
v:壓制,取締,遏制
emit
v:發(fā)射,發(fā)出,放出,發(fā)表,發(fā)行
Target-typed new expressions
目標類型的新表達式
static anonymous functions
靜態(tài)匿名函數(shù)
anonym
n:假名,無名氏
Target-typed conditional expressions
目標類型的條件表達式
Covariant return types
協(xié)變返回類型
Extension GetEnumerator support for foreach loops
擴展GetEnumerator支持foreach循環(huán)
Lambda discard parameters
Lambda棄元參數(shù)
Attributes on local functions
本地函數(shù)的屬性
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
創(chuàng)建不可變的引用類型
classes and anonymous types
類和匿名類型
structs and tuples
結構和元組
a copy of the original data
原始數(shù)據(jù)的副本
when value types are passed to methods
將值類型傳遞給方法時
concurrent programs with shared data
共享數(shù)據(jù)的并發(fā)程序
concurrent programs
并發(fā)程序; 并行程序; ?
concurrent
n:競爭者
總結
以上是生活随笔為你收集整理的C# 9.0中的新增功能 - 译的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 初步了解超图官网提供的应用程序
- 下一篇: 利用emu8086学习汇编int 10h