-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Update coding conventions for C# 13 #44283
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5f0bc6f to
0ef4f40
Compare
- dotnet#33341 already addressed in dotnet#36428. - Fixes dotnet#37294: Add text that the shortened format is valid only when the runtime type matches the variable type. - Fixes dotnet#37295: Don't use `ID` in the sample. - Fixes dotnet#37296: Fix nullable warnings. Other issue comments are incorrect. - Fixes dotnet#41748: Change the sample so the constructor is relevant. - Fixes dotnet#42858: Add an explanation on declaring variables in top level statements.
0ef4f40 to
040dba3
Compare
- Fixes dotnet#43838: Add notes for collection expressions and using primary constructors. Include naming recommendations. - Fixes dotnet#43839 Update the overview of constructors to include information on primary constructors.
a156ae2 to
29c3905
Compare
Fix any style issues with the current code.
I also caught a couple sample bits that I'd neglected in the previous commit.
gewarren
approved these changes
Jan 17, 2025
docs/csharp/programming-guide/classes-and-structs/using-constructors.md
Outdated
Show resolved
Hide resolved
docs/csharp/programming-guide/classes-and-structs/using-constructors.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Genevieve Warren <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dotnet-csharp/svc
fundamentals/subsvc
okr-freshness
OKR: Freshness of content
okr-quality
Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a number of issues related to constructor articles and coding conventions. This may be easier to review commit by commit:
IDin the sample.Internal previews