C# Extension Members | The .NET Tools Blog
Blog post from JetBrains
Extension members in C# provide a way to add functionality to existing types without altering their definitions, which is particularly useful for built-in types or those from external libraries. Initially introduced with extension methods in C# 3.0, these enhancements were limited to methods, excluding properties, fields, or operators. However, C# 14 introduced a new syntax that allows for both instance and static properties, methods, and operators, expanding the capabilities of extension members. The new extension block syntax enables developers to define extensions within a static class, facilitating the transformation of helper methods into properties, organizing related extensions, and incorporating static constants or factories into existing types. This approach maintains compatibility with existing code while offering a more integrated feel for third-party APIs. The development environment Rider simplifies the transition from classic to new extension members through its intention action feature, supporting a seamless upgrade process.