-
Notifications
You must be signed in to change notification settings - Fork 6k
Freshness: C# fundamentals and programming guides #49129
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
Freshness: C# fundamentals and programming guides #49129
Conversation
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 pull request comprehensively updates C# documentation for improved consistency and readability. The changes modernize language throughout multiple articles, standardize terminology, and correct grammatical issues to enhance the overall quality and professionalism of the documentation.
- Updated date metadata to reflect current revision dates across all files
- Standardized contractions and terminology ("isn't" vs "is not", "might" vs "may", etc.)
- Enhanced clarity in explanations of async programming, object-oriented concepts, and language features
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
docs/csharp/programming-guide/types/boxing-and-unboxing.md | Updated metadata date and improved contractions |
docs/csharp/programming-guide/generics/constraints-on-type-parameters.md | Updated date and expanded "CLR" abbreviation |
docs/csharp/programming-guide/concepts/index.md | Updated metadata date only |
docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md | Updated date and improved contractions |
docs/csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md | Enhanced clarity in explanations and updated terminology |
docs/csharp/programming-guide/classes-and-structs/named-and-optional-arguments.md | Standardized contractions and improved example references |
docs/csharp/programming-guide/classes-and-structs/access-modifiers.md | Updated date and corrected punctuation |
docs/csharp/fundamentals/types/interfaces.md | Standardized modal verbs and improved contractions |
docs/csharp/fundamentals/types/index.md | Updated contractions and terminology |
docs/csharp/fundamentals/types/generics.md | Updated metadata date only |
docs/csharp/fundamentals/types/classes.md | Updated date and expanded "CLR" abbreviation |
docs/csharp/fundamentals/types/anonymous-types.md | Comprehensive improvements to contractions and clarity |
docs/csharp/fundamentals/tutorials/oop.md | Enhanced readability and updated terminology |
docs/csharp/fundamentals/object-oriented/polymorphism.md | Standardized modal verbs and improved contractions |
docs/csharp/fundamentals/object-oriented/objects.md | Updated terminology and improved contractions |
docs/csharp/fundamentals/object-oriented/inheritance.md | Standardized contractions and improved clarity |
docs/csharp/fundamentals/coding-style/identifier-names.md | Added introductory content and fixed code snippet language identifiers |
docs/csharp/asynchronous-programming/task-asynchronous-programming-model.md | Extensive terminology updates and clarity improvements |
docs/csharp/advanced-topics/expression-trees/index.md | Updated date and standardized contractions |
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 great @meaghanlewis
I had a number of minor comments on word choice based on the history of how some features have evolved.
I also loaded each of the articles and looked at the existing code. In all cases, the code is fine, but I see a number of opportunities where we can modernize the examples.
This would expand the scope of this PR, so we can either make the changes, or log this for the future:
- In the "Inheritance" article, the
WorkItem
class could be simplified using primary constructors and field initializers. - In the "Objects" article, the
Person
struct can be simplified with the addition of parameterless constructors and field initializers - In the "Polymorphism" article, the
get; private set;
properties could be changed toget; init;
to emphasize that the object doesn't change after creation. - In "Polymorphism", the collections could use collection initializers instead of "new"
- In Polymorphism, there are a lot of opportunities for expression bodied members (this is true in several samples)
- A lot of code in "object and collection initializers" could be simplified using collection expressions and expression bodied properties.
The easiest way to find and address these might be to load the projects in Visual Studio and see the suggestions from the IDE.
Let's discuss if you want to expand the scope of this PR, or note these changes for later. If we want to note them for later, I'll approve this now.
…is/docs into freshness-pass-csharp
…dation in sample code
Co-authored-by: Bill Wagner <[email protected]>
Co-authored-by: Bill Wagner <[email protected]>
Co-authored-by: Bill Wagner <[email protected]>
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.
I had two suggestions where the (now better) code doesn't match the syntax being described. Once you accept those, .
This is awesome!
docs/csharp/fundamentals/object-oriented/snippets/inheritance/hierarchy.cs
Outdated
Show resolved
Hide resolved
...amming-guide/classes-and-structs/snippets/static-classes-and-static-class-members/Program.cs
Outdated
Show resolved
Hide resolved
…hierarchy.cs Co-authored-by: Bill Wagner <[email protected]>
…tic-classes-and-static-class-members/Program.cs Co-authored-by: Bill Wagner <[email protected]>
Summary
This pull request updates and improves the documentation for expression trees and asynchronous programming in C#. The changes focus on clarifying explanations, updating terminology to be more consistent and modern, and correcting minor language issues for better readability.
Documentation improvements:
ms.date
metadata in bothdocs/csharp/advanced-topics/expression-trees/index.md
anddocs/csharp/asynchronous-programming/task-asynchronous-programming-model.md
to reflect new revision dates. [1] [2]task-asynchronous-programming-model.md
. [1] [2] [3] [4] [5] [6] [7]Language and clarity enhancements:
Terminology consistency:
Fixes #48470
Internal previews
Toggle expand/collapse