#Extension-Methods
2 notas · última:
Using Extension Methods in C# to Build Fluent Code
The article explains static methods, extension methods, and method chaining in C#. It shows how extension methods can create fluent APIs and how LINQ relies on them.
Pseudo Traits in C#
The post shows how C# 8.0 default interface implementations inspired a trait-like pattern in C# 7.0 using marker interfaces and extension methods, letting empty classes gain behavior by implementing the right interfaces.
