What's New in C#7, C#8, C#9 and C#10

所在平台: Udemy

课程主页: https://www.udemy.com/course/csharp7-whats-new/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:C#7、C#8、C#9和C#10的新特性 课程概述: 该短期课程涵盖了C#语言的最新特性,介绍了版本7、7.1、7.2、7.3、8.0、9.0和10.0的语言功能,这些特性与相应的Visual Studio更新同时发布。 课程主题: 本课程按C#语言版本分组,介绍了每个版本的新特性。 C# 7: - 输出变量 - 模式匹配(is和switch表达式) - 元组及元组解构 - 局部函数 - 引用返回值和局部变量 - 表达式体成员 - 抛出表达式 - 一般化异步返回类型 - 文本改进 C# 7.1: - 如何启用C# 7.1支持 - 异步主方法 - 默认表达式 - 引用程序集 - 推断元组名称 - 带有泛型的模式匹配 C# 7.2: - 领先数字分隔符 - 'Private Protected'访问修饰符 - 非尾名参数 - 值类型的引用语义 - 'In'参数 - 'Ref Readonly'变量 - 'Ref Struct'和Span C# 7.3: - 性能提升 - 访问固定字段而无需固定 - 重新分配引用局部变量 - 在stackalloc数组上使用初始化器 - 在支持模式的任何类型上使用固定语句 - 对现有特性的增强 - 元组的==和!=支持 - 在更多位置使用表达式变量 - 将属性附加到自动属性的后备字段 - 改进方法解析 - 新编译器选项:deterministic、public、sign、path、map C# 8: - 可空引用类型 - 索引和范围 - 默认接口成员 - 模式匹配 C# 9: - 记录类型 - 顶级调用 - 初始设置器 - 模式匹配改进(类型模式、括号模式、联结性或、否定模式、关系模式) - 性能和互操作(原生大小整数、函数指针、SkipLocalsInit) - 完善与优化(目标类型的new、条件表达式的目标类型解析、lambda表达式和匿名方法的静态修饰符、协变返回类型、foreach的GetEnumerator()使用、丢弃作为lambda的参数、本地函数的属性) C# 10: - 记录结构 - 全局使用指令 - 文件作用域的命名空间声明 - 扩展属性模式 - 泛型属性 - lambda改进(属性、显式返回类型、自然类型推断) - 增强的#line指令 先决条件: - 具备C# 6及以前版本的知识和理解 - 一般.NET/C#应用程序开发经验 学习成果: - 理解和欣赏最新的C# 7/7.1/7.2/7.3/8/9语言特性 - 理解如何将现有C#代码转换为C# 7/7.1/7.2/7.3/8/9

课程评论(0条)

课程详情

This short course covers the latest and greatest features of C#, covering versions 7, 7.1, 7.2, 7.3, 8.0, 9.0 and 10.0 of the language that are being sim-shipped with corresponding Visual Studio updates.Course TopicsHere's every language feature presented in this course, grouped by the version of the C# language.C# 7:Out VariablesPattern Matching (is and switch expressions)Tuples and Tuple DeconstructionLocal FunctionsRef Returns and LocalsExpression Bodied MembersThrow ExpressionsGeneralized Async Return TypesLiteral ImprovementsC# 7.1:How to turn on C# 7.1 supportAsync MainDefault ExpressionsRef AssembliesInfer Tuple NamesPattern-Matching with GenericsC# 7.2:Leading Digit Separators'Private Protected' Access ModifierNon-Trailing Named ArgumentsReference Semantics on Value Types:'In' Parameters'Ref Readonly' Variables'Ref Struct' and SpanC# 7.3:Performance improvementsAccess fixed fields without pinningReassign ref local variablesUse initializers on stackalloc arrays Use fixed statements on any type that supports a pattern Enhancements to existing features Tuple == and!= support Use expression variables in more locations Attach attributes to backing field of auto-properties Improved method resolution when arguments differ by 'in' Improved overload resolution New compiler options: deterministicpublicsignpathmapC# 8:Nullable Reference TypesIndices and RangesDefault Interface MembersPattern MatchingC# 9:Record TypesTop-Level CallsInitial SettersPattern Matching Improvements (type patterns, parenthesized patterns, conjunctive and, disjunctive or, negated not, relational patterns)Performance and Interop (Native sized integers (nint/nuint), function pointers, SkipLocalsInit)Fit and Finish (target-typed new, target type resolution of conditional expressions, static modifier for lambda expressions and anonymous methods, covariant return types, foreach GetEnumerator() use, discards as parameters to lambdas, attributes on local functions)C# Code Generators (partial method syntax, module initializers)C# 10:Record StructsGlobal Using DirectivesFile-Scoped Namespace DeclarationsExtended Property PatternsGeneric AttributesLambda Improvements (attributes, explicit return types, natural type inference)Enhanced #line directivesPrerequisitesKnowledge and understanding of C# 6 and earlierGeneral experience in.NET/C# application developmentLearning OutcomesAn understanding and appreciation of latest C# 7/7.1/7.2/7.3/8/9 language featuresUnderstanding of how to convert existing C# code to C# 7/7.1/7.2/7.3/8/9

课程标签

0人关注该课程

主题相关的课程