#frameworkdesign — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #frameworkdesign, aggregated by home.social.
-
@bitbonk A default interface implementation would result in reflection seeing the method on the interface where it would not see the extension method.
I was going to say that one instance I can think of where this would have an impact is in list initialization, where the runtime detects an "Add" method with the required signature, but I have just read that the "Add" method can also be an extension method. I never knew that.
#dotnet #APIDesign #FrameworkDesign #FrameworkDesignGuidelines
-
When should I favor extension methods over #Charp 8 default interface implementations?
When I have an extension method in the same assembly and namespace as the interface it extends, is there any reason to *NOT* use a default interface implementation on the interface instead?
#dotnet #APIDesign #FrameworkDesign #FrameworkDesignGuildlines
@bot