Replies: 1 comment 1 reply
-
@BillWagner Can you transfer this to the docs site. I can't seem to do it on my end. Thanks :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is a ton of confusion out in the community on how to use Default Interface Methods and the awful documentation makes matters worse. Microsoft Learn/MSDN has inherited the last version of the proposal from 2019 - which contains ideas like
override
that were not actually in the implementation as far as I can tell (the code under Base interface invocations does not compile). Mads' blog post from 4 years ago is similarly bereft of most details about the feature and should either be updated or deleted, IMHO.In addition to just containing flat-out-wrong information, the docs also don't address the most common pit-of-failure with this feature which is that people expect classes to inherit functionality from the interface.
Related, the docs should call out the fact that you cannot actually access a DIM from an implementing class unless it is static (this is something I think the language should find a solution for as the workaround is very clunky):
Can only delegate to DIMs if you use statics.
We absolutely need accurate docs for DIMs that include the current state of the feature, including the changes made in C# 11 around static members. You guys can't make fundamental type system changes and then not provide accurate documentation. Please fix this!
Beta Was this translation helpful? Give feedback.
All reactions