-
Notifications
You must be signed in to change notification settings - Fork 6k
Document projection initializers (simplified names) for anonymous types #47709
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
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 great start. One sentence is too vague.
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 now ready for final review.
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.
Please add periods in code comments.
@copilot Please make this change. |
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Added comprehensive documentation for anonymous type projection initializers, which allows developers to use simplified syntax when creating anonymous types. This feature lets you use local variables directly without explicitly specifying member names.
Changes Made
Documentation Enhancement
Code Examples
Added practical examples demonstrating the simplified syntax:
The documentation now clearly shows that these two approaches create equivalent anonymous types, addressing the original request for side-by-side comparisons.
Additional Context
All code examples have been tested and verified to compile and run correctly. The documentation follows Microsoft Writing Style Guide conventions and includes proper cross-references.
Fixes #33322.
💡 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