-
Notifications
You must be signed in to change notification settings - Fork 6k
Clarify interface implementation accessibility requirements and provide comprehensive guidance for internal interfaces #48050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ity requirements Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start, but has misleading information.
@copilot address the review comments.
…pabilities and add comprehensive example Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
I've addressed the review feedback about the misleading information. The documentation now correctly explains that internal interfaces can typically be implemented with public members when all signature types are publicly accessible. I've added a comprehensive example showing both scenarios: when implicit implementation works and when explicit implementation is required. Changes in commit 563cf2e. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, once there's a small change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The documentation for interface implementation stated that implementing members "must be public" without clarifying this applies only to implicit implementation. Additionally, it incorrectly suggested that internal interfaces always require explicit implementation, when in fact they can use implicit implementation as long as all types in the signature are publicly accessible.
Changes Made
Updated the core statement on line 29 to clarify that the public requirement applies specifically to implicit implementation:
Revised "Working with internal interfaces" section to accurately explain:
Enhanced code example showing:
This provides accurate guidance on when each implementation approach is needed and addresses the confusion around internal interfaces and accessibility requirements.
Fixes #44194.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews