-
Notifications
You must be signed in to change notification settings - Fork 6k
Create tutorial for C# 14 extension members #48896
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
Tagging @adegeo because he gave me some ideas for extensions |
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.
Pull Request Overview
This PR creates a comprehensive tutorial for C# 14 extension members, a new language feature that enhances the existing extension methods functionality by enabling properties, operators, and type-level extensions.
Key Changes:
- Added a new tutorial demonstrating extension members syntax and capabilities
- Created supporting code samples comparing traditional extension methods with new extension member features
- Updated the table of contents to include the new tutorial
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
docs/csharp/whats-new/tutorials/extension-members.md | Main tutorial document explaining extension members concepts and syntax |
docs/csharp/toc.yml | Added navigation entry for the new extension members tutorial |
docs/csharp/whats-new/tutorials/snippets/PointExtensions/*.cs | Code samples demonstrating both traditional extension methods and new extension members |
docs/csharp/whats-new/tutorials/snippets/PointExtensions/NewExtensionsMembers.cs
Outdated
Show resolved
Hide resolved
docs/csharp/whats-new/tutorials/snippets/PointExtensions/ExtensionMethods.cs
Outdated
Show resolved
Hide resolved
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.
Great tutorial @BillWagner! I left primarily style changes for you to consider.
docs/csharp/whats-new/tutorials/snippets/PointExtensions/ExtensionMethodsDemonstrations.cs
Outdated
Show resolved
Hide resolved
docs/csharp/whats-new/tutorials/snippets/PointExtensions/ExtensionMethodsDemonstrations.cs
Outdated
Show resolved
Hide resolved
docs/csharp/whats-new/tutorials/snippets/PointExtensions/IncludedElements.cs
Outdated
Show resolved
Hide resolved
docs/csharp/whats-new/tutorials/snippets/PointExtensions/IncludedElements.cs
Outdated
Show resolved
Hide resolved
docs/csharp/whats-new/tutorials/snippets/PointExtensions/IncludedElements.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Meaghan Osagie (Lewis) <moneikmarie@gmail.com>
Create a tutorial to explore C# 14 extension members.
Fixes #45612
Internal previews