What's New in C#7, C#8, C#9 and C#10
Master modern C# development! Explore C# 7, 8, 9 & 10 features. Enhance your coding skills with the latest language updates.
Course Content
What's New in C#7, C#8, C#9 and C#10 is a beginner-level Udemy course taught by Dmitri Nesteruk. It runs 4h 56m, is taught in English, and includes a certificate of completion. Learners rate it 4.3 out of 5 from 2,141 reviews, with 12,927 students enrolled. It is a paid course, last updated November 2021.
Explore the latest advancements in C# with this comprehensive course covering versions 7 through 10! This short course delves into the newest features introduced in C# 7, 7.1, 7.2, 7.3, 8, 9, and 10, all available with corresponding Visual Studio updates. Learn how to leverage these powerful additions to enhance your .NET development skills.
Course Topics: A Deep Dive into Modern C#
This course provides a detailed look at each language feature, organized by C# version:
C# 7: Key Language Enhancements
- Out Variables: Simplify code with improved variable handling.
- Pattern Matching: Utilize
isandswitchexpressions for more concise and readable code. - Tuples and Tuple Deconstruction: Work with multiple values in a structured and convenient way.
- Local Functions: Enhance code organization and readability with functions defined within other functions.
- Ref Returns and Locals: Improve performance and code clarity with reference types.
- Expression Bodied Members: Write more compact methods and properties.
- Throw Expressions: Simplify exception handling.
- Generalized Async Return Types: Increase flexibility in asynchronous programming.
- Literal Improvements: Benefit from enhanced literal types.
C# 7.1: Refining Your Code
- Async Main: Simplify asynchronous application startup.
- Default Expressions: Provide default values for parameters.
- Ref Assemblies: Improve performance with reference assemblies.
- Infer Tuple Names: Automatically determine tuple names for cleaner code.
- Pattern-Matching with Generics: Extend pattern matching capabilities to generic types.
C# 7.2: Enhanced Value Types and Semantics
- Leading Digit Separators: Improve readability of numeric literals.
- 'Private Protected' Access Modifier: Fine-grained control over access modifiers.
- Non-Trailing Named Arguments: More flexible function calls.
- Reference Semantics on Value Types: Leverage reference semantics for value types.
- 'In' Parameters: Pass parameters by reference without ownership.
- 'Ref Readonly' Variables: Create read-only reference variables.
- 'Ref Struct' and Span: Improved support for structs and spans.
C# 7.3: Performance and Flexibility
- Performance Improvements: Benefit from various performance optimizations.
- Access Fixed Fields Without Pinning: Improved access to fixed fields.
- Reassign Ref Local Variables: Dynamically reassign reference local variables.
- Use Initializers on Stackalloc Arrays: Optimize stack allocation.
- Use Fixed Statements on Any Type that Supports a Pattern: Enhanced fixed statement capabilities.
- Tuple == and != Support: Compare tuples for equality.
- Use Expression Variables in More Locations: Increased flexibility with expression variables.
- Attach Attributes to Backing Field of Auto-Properties: Metadata for auto-properties.
- Improved Method Resolution When Arguments Differ by 'In': More accurate method lookup.
- New Compiler Options:
deterministicpublicsignpathmap: Control code signing behavior.
C# 8: Modern Language Features
- Nullable Reference Types: Improved null safety.
- Indices and Ranges: Easily iterate over collections using indices and ranges.
- Default Interface Members: Provide default implementations for interface members.
- Pattern Matching: Enhanced pattern matching capabilities.
C# 9: Powerful New Types and Patterns
- Record Types: Create immutable data types with concise syntax.
- Top-Level Calls: Execute code directly at the top level of a file.
- Initial Setters: Initialize record properties with initial values.
- Pattern Matching Improvements: Advanced pattern matching with type patterns, parenthesized patterns, conjunctive and disjunctive or, negated not, and relational patterns.
- Performance and Interop: Native sized integers (nint/nuint), function pointers, and
SkipLocalsInitfor performance optimization. - 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 and module initializers.
C# 10: Advanced Features and Enhancements
- Record Structs: Combine the benefits of records and structs.
Need a web app built? Hire the team behind TutorialSearch.io
We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.