We may earn an affiliate commission when you visit our partners.
Dmitri Nesteruk

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 Topics

Here's every language feature presented in this course, grouped by the version of the C# language.

C# 7:

Read more

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 Topics

Here's every language feature presented in this course, grouped by the version of the C# language.

C# 7:

  • Out Variables

  • Pattern Matching (is and switch expressions)

  • Tuples and Tuple Deconstruction

  • Local Functions

  • Ref Returns and Locals

  • Expression Bodied Members

  • Throw Expressions

  • Generalized Async Return Types

  • Literal Improvements

C# 7.1:

  • How to turn on C# 7.1 support

  • Async Main

  • Default Expressions

  • Ref Assemblies

  • Infer Tuple Names

  • Pattern-Matching with Generics

C# 7.2:

  • Leading Digit Separators

  • 'Private Protected' Access Modifier

  • Non-Trailing Named Arguments

  • Reference Semantics on Value Types:

    • 'In' Parameters

    • 'Ref Readonly' Variables

    • 'Ref Struct' and Span<T>

C# 7.3:

  • Performance improvements

    • Access fixed fields without pinning

    • Reassign ref local variables

    • Use 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: 

    • deterministic

    • publicsign

    • pathmap

C# 8:

  • Nullable Reference Types

  • Indices and Ranges

  • Default Interface Members

  • Pattern Matching

C# 9:

  • Record Types

  • Top-Level Calls

  • Initial Setters

  • Pattern 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 Structs

  • Global Using Directives

  • File-Scoped Namespace Declarations

  • Extended Property Patterns

  • Generic Attributes

  • Lambda Improvements (attributes, explicit return types, natural type inference)

  • Enhanced #line directives

Prerequisites

  • Knowledge and understanding of C# 6 and earlier

  • General experience in .NET/C# application development

Learning Outcomes

  • An understanding and appreciation of latest C# 7/7.1/7.2/7.3/8/9 language features

  • Understanding of how to convert existing C# code to C# 7/7.1/7.2/7.3/8/9

Enroll now

What's inside

Learning objectives

  • Understand and appreciate c#7, c#8 and c#9 language features
  • Learn how to use new language features in practice

Syllabus

A description of the contents of this course.

Understand all the features of C# 7

It used to be the case that, in order to use an out variable, you had to declare it first. Well, not anymore!

Read more

Not quite the F# pattern-matching on structural types, but it's a start.

Better tuples with names and deconstruction. Somewhat ruined by the requirement of an external Nuget package.

Update: System.ValueTuple is now part of .NET Framework 4.7.

What is deconstruction and why should you care?

Functions inside functions, what could be simpler?

References! Just like in C++, except not quite.

A community-proposed feature of extending expression bodies to constructors/destructors and getters/setters.

Throw from a null-coalescing expression? What madness is this?

Async method return types are no longer restricted to void/Task/Task<T>.

Underscores in decimal, hex and binary literals.

Understand all the new features in C# 7.1

If you make a new project in Visual Studio 2017.3 and try to use a C#7.1 feature, the project won't compile. Why is that?

Oh, and what happens if your assembly has multiple Main methods, some async and some not?

The Main() method can now be marked async and is allowed to return a Task or Task<int>.

Watch the default keyword become a literal (similar to the null literal) and start taking on additional responsibilities.

Learn about assemblies whose method bodies are replaced with throw
null
.

Just as the name suggests, this feature allows us, in certain cases, to infer tuple names and lets us omit them.

C# 7.1 makes it easier to pattern-match against a variable of a generic type.

Learn about the new features in C# 7.2

You can now put an underscore after a binary (0b) or hexadecimal (0x) literal prefix.

A new access modifier called 'private protected' was introduced. Learn what it's for and how it is different from 'protected internal'.

Named arguments can now appear before positional ones.

Value types can now be passed by reference. What magic is this?

Since references to value types are meant to be readonly (otherwise, just pass by value), we have a new 'ref readonly' qualifier.

The 'ref struct' feature was designed specifically for Span<T> in mind... shame that the type itself is not yet ready.

Even though Span<T> is still in prerelease form, let's take a look at it anyway! Its internal mechanics will change, but the public API probably won't.

Learn about the new features of C# 7.3/VS2017 15.7

Improvements to C#, related mainly to unsafe memory manipulations.

Some minor improvements to existing C# features.

Three new compiler flags!

OOPS: the explanation for -publicsign is incorrect and will be fixed! Sorry!

A couple of links to my other .NET/C# courses!

Learn about the new features in C# 8

Probably the worst, most incorrect name given to a feature, Nullable Reference Types are a new way of generating null-related warnings.

Two new pieces of syntactic sugar and two new types, Index and Range, help you index into and take parts of collections easier.

A rather controversial feature, default interface members allow you to patch interfaces after deployment with concrete implementations. .NET Core only!

Continuing to steal features from F#, pattern matching is now augmented with many useful features.

Learn about the new features in C#9/.NET 5

Say hello to C#9!

Record types make it easy to create data classes where the chores of equality, hash codes and string output are taken care of for you by the compiler.

Top-level calls make it easy to create single-file C# scripts by avoiding namespace/class/Main method declarations altogether.

Fields have 'readonly', and now properties have 'init'.

It never ends, does it?

If the type can be inferred at a particular location, you don't have to type its name anymore!

Some simple code generation functionality built into the compiler.

Some tools to help support source generators.

Learn what's new in C# 10

Learn what's new in C# 10.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Covers features from C# 7 through C# 10, which allows developers to incrementally adopt new language features in existing projects
Explores pattern matching improvements, which enhances code readability and reduces boilerplate, especially when dealing with complex data structures
Discusses nullable reference types, which helps developers write safer code by reducing the risk of null reference exceptions at runtime
Requires prior knowledge of C# 6 and general .NET/C# application development experience, which may exclude novice programmers
Examines 'ref struct' and Span, which are designed for high-performance scenarios but may require a deeper understanding of memory management
Includes coverage of C# 7.1, 7.2, and 7.3, which may be of limited interest to developers focused solely on the latest major releases

Save this course

Save What's New in C#7, C#8, C#9 and C#10 to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in What's New in C#7, C#8, C#9 and C#10 with these activities:
Review C# 6 Features
Reviewing C# 6 features will provide a solid foundation for understanding the new features introduced in later versions covered in this course.
Browse courses on C# 6
Show steps
  • Read through your old C# 6 notes and code samples.
  • Complete practice exercises focusing on key C# 6 concepts.
  • Identify areas where your understanding is weak and focus your review there.
Read 'C# 7.0 in a Nutshell'
Reading 'C# 7.0 in a Nutshell' will provide a deeper understanding of the C# 7 features covered in the course.
View C# 7.0 in a Nutshell on Amazon
Show steps
  • Read the chapters related to the C# 7 features covered in the course.
  • Try out the code examples provided in the book.
  • Take notes on key concepts and syntax.
Implement Features from C# 7-10
Practicing implementing the new C# features will solidify your understanding and improve your ability to use them effectively.
Show steps
  • Choose a few C# 7-10 features to focus on.
  • Create small projects or code snippets that utilize these features.
  • Experiment with different ways to use the features and observe the results.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Answer Questions on C# Forums
Answering questions on C# forums will reinforce your understanding of the language and help you learn from others.
Show steps
  • Find C# forums or online communities.
  • Browse the forums for questions related to the topics covered in the course.
  • Provide clear and helpful answers to the questions.
  • Participate in discussions and learn from other developers.
Write a Blog Post on Nullable Reference Types
Writing a blog post will force you to deeply understand Nullable Reference Types and explain them clearly to others.
Show steps
  • Research Nullable Reference Types thoroughly.
  • Write a clear and concise explanation of the feature.
  • Include code examples to illustrate the usage of Nullable Reference Types.
  • Edit and proofread your blog post before publishing.
Refactor an Existing Project to Use C# 9 Features
Refactoring an existing project will provide practical experience in applying the new C# 9 features to real-world code.
Show steps
  • Choose an existing C# project to refactor.
  • Identify areas where C# 9 features like record types or top-level statements can be used.
  • Refactor the code to utilize these features.
  • Test the refactored code to ensure it functions correctly.
Read 'CLR via C#'
Reading 'CLR via C#' will provide a deeper understanding of the underlying .NET platform and how C# features are implemented.
Show steps
  • Read the chapters related to memory management, garbage collection, and type system.
  • Pay attention to how the CLR supports different C# features.
  • Take notes on key concepts and how they relate to C# code.

Career center

Learners who complete What's New in C#7, C#8, C#9 and C#10 will develop knowledge and skills that may be useful to these careers:
Software Developer
A software developer builds and maintains applications, and this course is directly relevant to staying current with the latest C# language features. Staying updated with features such as pattern matching, record types, and nullable reference types helps a software developer write more efficient and robust code. This course, focusing on C# 7 through C# 10, is essential for any developer wanting to leverage new language capabilities. The course's focus on specific features like 'in' parameters and 'ref struct' provides knowledge for optimizing performance in C# applications.
Application Developer
An application developer designs and implements software applications, and this course is invaluable for keeping skills sharp with modern C# development. The detailed exploration of C# versions 7 through 10 allows an application developer to use the most up-to-date features of the language. The course content, covering areas such as async main, ref returns, and code generators, helps to create applications that are performant and maintainable. An application developer benefits from this course's practical insights into modern C#.
Software Engineer
A software engineer is responsible for designing, developing, and maintaining software systems, and this course provides the essential updates in C# needed to excel in this role. The course's thorough coverage of C# 7 to C# 10 features ensures a software engineer is familiar with the latest language capabilities. Software engineers will find that the course's detailed explanations of topics such as record structs, pattern matching improvements, and lambda improvements help them write clean, efficient, and modern code. For a software engineer, this course provides necessary knowledge of the latest C# improvements.
Systems Programmer
A systems programmer focuses on low-level software development, working closely with operating systems and hardware, and this course is useful for those using C# for systems-level tasks. The course's coverage of features like 'ref struct' and 'Span<T>' in C# 7.2, and performance interop features in C# 9, provides systems programmers with tools for writing efficient code. A systems programmer will find that understanding the compiler options and performance improvements of C# 7.3 enables them to optimize the performance of programs. Those in this field should take this course for its focus on low-level capabilities.
Game Developer
A game developer creates video games, and this course is useful for those using C# in their development process. The course's focus on newer language features such as 'in' parameters, 'ref readonly' variables and performance improvements in C# 7.3 & 9 gives game developers the needed knowledge for writing high performance code. The understanding of features like pattern matching and record types can also prove beneficial in game development. A game developer benefits from the course's coverage on modern C# features, allowing for better game design and implementation.
Mobile Application Developer
A mobile application developer crafts applications for mobile devices, and this course provides relevant updates in C# for mobile development using frameworks like Xamarin. The course's coverage of new C# features up to C# 10 enables a mobile application developer to utilize the latest language capabilities. A mobile application developer will find that the course's discussion of features such as default interface members, nullable reference types, and code generators can improve the maintainability and robustness of mobile applications. Mobile developers should consider this course to stay updated on C#.
Web Developer
A web developer is responsible for building and maintaining websites and web applications, and this course can help them if using C# for backend development. The course’s deep dive into C# versions 7 through 10 provides a web developer with the necessary skills to leverage language updates. A web developer will find that the course's detailed content on topics like async main, pattern matching, and record types can help them build and improve web applications. Taking this course helps web developers in C# stay competitive.
Database Programmer
A database programmer is responsible for designing, developing, and maintaining databases and this course may be useful for programmers using C# to interface with databases. The course's emphasis on modern C# features like pattern matching and record types helps a database programmer write more concise code for data manipulation. Database programmers may find the course’s exploration of features such as ref returns and 'in' parameters beneficial for optimizing database interactions. This course may be suitable for enhancing C# skills in database programming.
DevOps Engineer
A DevOps engineer focuses on automating and optimizing software development and deployment processes, and this course may be useful for tasks that involve C# based tooling. The course's coverage of new C# features can help a DevOps engineer create more efficient automation scripts. DevOps engineers may find features like code generators, lambda improvements, and performance and interop features useful for building and maintaining software pipelines. DevOps engineers working with the .NET ecosystem may find this course beneficial for optimizing workflow.
Technical Lead
A technical lead guides a software development team, and this course offers the latest information needed to ensure teams are using modern C# practices. The course's review of C# 7 through C# 10 helps a technical lead understand the benefits of newly added features. Technical leads may find that topics such as nullable reference types, code generators, and performance improvements enable them to guide team members in adopting best practices. Technical leads should consider taking this course to stay in sync with C# language updates.
Software Architect
A software architect is responsible for the high-level design of software systems, and this course helps them understand the capabilities of the latest C# features. The course’s thorough coverage of C# 7 through 10 enables a software architect to plan systems that benefit from updated language features. Software architects may find it valuable to know about features such as default interface members, record types, and C# code generators. Architects can use this course to make informed decisions about the technology stack.
Embedded Systems Engineer
An embedded systems engineer designs and develops software for embedded systems, and this course may be useful if using C# for embedded applications. The course's deep dive into low-level C# features such as 'ref struct', 'Span<T>', and performance interop features can be useful for optimizing performance-critical tasks. The knowledge gained from this course in areas such as performance and interop helps an embedded systems engineer. While not the primary domain for C#, a course covering low-level capabilities may prove beneficial.
Data Scientist
A data scientist analyzes large data sets using statistical and machine-learning techniques, and this course may be helpful if they use C# for tooling or data processing. The course’s coverage of performance features like 'in' parameters and 'ref readonly' variables, and the performance interop features may be beneficial for writing performant code. Data scientists may choose to take this course if C# is part of their workflow and they would like to be familiar with the latest language capabilities.
Quality Assurance Engineer
A quality assurance engineer is responsible for testing software applications, and this course may be useful if they use C# to create testing tools. The course's coverage of new C# features helps a quality assurance engineer understand how new language syntax impacts testing strategies. An understanding of modern C# may enable quality assurance engineers to build better testing tools using the latest features of the language. Quality assurance engineers can leverage the course content if they are involved in C# testing workflows.
Technical Writer
A technical writer produces documentation for software products; this course may be useful for those creating documentation for C# software or features. The detailed explanation of C# language features in this course can help a technical writer understand and document these concepts accurately. Technical writers may find the course’s coverage of topics such as pattern matching and record types useful for explaining code to end users. Technical writers working with C# developers may find this course helpful.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in What's New in C#7, C#8, C#9 and C#10.
Provides a comprehensive overview of C# 7.0, covering all the new features in detail. It serves as an excellent reference guide for understanding the syntax and usage of these features. It is particularly useful for developers who want to quickly learn and apply the new features in their projects. This book is commonly used as a reference by C# developers.
Provides a deep dive into the Common Language Runtime (CLR), which is the foundation of the .NET platform. Understanding the CLR will help you write more efficient and robust C# code. While not directly focused on the new C# features, it provides valuable background knowledge for understanding how these features are implemented and how they interact with the CLR. This book is commonly used by experienced .NET developers.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser