Skip to content

Include and link primary constructors to CS0236 example#52847

Merged
BillWagner merged 2 commits intodotnet:mainfrom
BartoszKlonowski:43353/fix/primary-constructors
Apr 2, 2026
Merged

Include and link primary constructors to CS0236 example#52847
BillWagner merged 2 commits intodotnet:mainfrom
BartoszKlonowski:43353/fix/primary-constructors

Conversation

@BartoszKlonowski
Copy link
Copy Markdown
Contributor

@BartoszKlonowski BartoszKlonowski commented Apr 2, 2026

This pull request closes #43353.
It adds point 5. to the list of ways to solve the CS0236 error with the primary constructors (as a link to the page),
as well as shows a brief example of how to use that new feature in context of solving this specific problem of CS0236.


Internal previews

📄 File 🔗 Preview link
docs/csharp/misc/cs0236.md Compiler Error CS0236

@BartoszKlonowski BartoszKlonowski requested review from a team and BillWagner as code owners April 2, 2026 17:54
@dotnetrepoman dotnetrepoman bot added this to the April 2026 milestone Apr 2, 2026
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc csharp-errors-warnings/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Apr 2, 2026
Copy link
Copy Markdown
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @BartoszKlonowski

This LGTM, and I'll :shipit: now.

@BillWagner BillWagner enabled auto-merge (squash) April 2, 2026 19:12
@BillWagner BillWagner merged commit 3d2d43b into dotnet:main Apr 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. csharp-errors-warnings/subsvc dotnet-csharp/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include post C# 12.0 "primary constructor" implications to the rule

2 participants