Although the C# 14 language was formally launched along with the .NET 10 framework a week ago, Microsoft has put the language update in view again. C# 14 features extension members, a new syntax for declaring extension properties and extension methods. Overall, C# 14’s enhancements improve developer productivity and performance, the company said.
In a November 17 blog post, Microsoft introduced introduced C# 14, the latest update to the company’s popular object-oriented language for .NET, and described extension members as the headline feature. Extension methods allow developers not only to declare extension properties and extension methods, but also to declare extension members that extend the type, rather than an instance of the type. These new extension members can appear as static members of the type extended. Extensions can include user-defined operators implemented as static extension methods.
Also in C# 14 is a set of capabilities designated as offering more productivity by reducing friction for everyday tasks. These capabilities eliminate boilerplate, remove common conditional blocks, simplify lambda declarations, enhance partial types for source generators, and make nameof more expressive in generic scenarios, according to Microsoft. Typing is reduced and developers get cleaner code, fewer trivial identifiers, and code that communicates intent more cleanly. These capabilities include the following:



