Join Mads and Dustin on a demo-filled tour through upcoming features in C# 14 and beyond. Dictionary expressions, new kinds of extension members and field access in auto-properties are some of the ways that C# keeps making your code clearer, cleaner and more expressive.

AI Summary

Introduction: In the session, further developments and enhancements to the C# language were introduced, including new techniques for handling complex operations more efficiently and making the code cleaner.

Extension Members: The focus was on the implementation of extension members in C#. This new feature allows for more flexible and powerful code design, enabling developers to add methods, properties, or other members to classes externally. This can revolutionize how developers manage large codebases and enhance code reusability and organization.

Operator Overloading and Compound Operators: Discussion moved towards enhancing operator overloading in C#, including the possibility of defining custom behaviors for compound operators like += or -=. This addition could lead to more nuanced control over how objects handle operations, potentially leading to performance optimizations in data-intensive applications.

Dictionary Expressions: A new proposal was discussed for dictionary expressions, which seek to streamline the way dictionaries are manipulated and accessed in C#. By treating dictionaries more like collections, the new expressions would simplify dictionary initialization and usage, fostering more readable and concise code.

Performance Considerations: The speakers addressed the balance between adding high-level language features and maintaining the execution performance of C#. They highlighted ongoing efforts to optimize language constructs like collection expressions and pattern matching to ensure they do not adversely affect runtime performance.

Q&A and Discussion: The session concluded with a Q&A segment where attendees asked about the roadmap for C# language features, specifically around tuple operations and other potential data structures. The discussion underscored the community’s interest in both simplifying code syntax and enhancing the language’s capability to handle more sophisticated programming scenarios efficiently.

Overall, the discussion indicated a strong push towards making C# more versatile and efficient, ensuring it remains competitive and capable of addressing modern software development challenges.

About the speakers

Dustin Campbell Software Architect Microsoft Dustin Campbell is a principal software engineer on the .NET Developer Experience team, where he currently works on the Razor, C# and Visual Basic language experiences for Visual Studio and Visual Studio Code. Passionate about coding productivity, Dustin’s primary focus is on making .NET tooling great and helping design the next version of C# as part of the language design team.

Mads Torgersen Architect Microsoft Mads is the lead designer of the C# programming language and a Principal Architect at Microsoft.