Skip to content

Add C# 8 parameter shadowing history item#54372

Merged
BillWagner merged 3 commits into
dotnet:mainfrom
FestimReqi:docs/csharp-8-parameter-shadowing
Jun 16, 2026
Merged

Add C# 8 parameter shadowing history item#54372
BillWagner merged 3 commits into
dotnet:mainfrom
FestimReqi:docs/csharp-8-parameter-shadowing

Conversation

@FestimReqi

@FestimReqi FestimReqi commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #52972

Adds the missing C# 8 history item for lambda expressions, anonymous methods, and local functions allowing parameters to shadow local variables and parameters from an enclosing scope.


Internal previews

📄 File 🔗 Preview link
docs/csharp/programming-guide/classes-and-structs/local-functions.md Local functions (C# Programming Guide)
docs/csharp/whats-new/csharp-version-history.md The history of C#

@FestimReqi FestimReqi requested review from a team and BillWagner as code owners June 13, 2026 11:27
@dotnetrepoman dotnetrepoman Bot added this to the June 2026 milestone Jun 13, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates PR is created by someone from the .NET community. label Jun 13, 2026
@BillWagner

Copy link
Copy Markdown
Member

Hi @FestimReqi

See this comment: #52972 (comment) Can you make a similar change in that article as well?

@FestimReqi

Copy link
Copy Markdown
Contributor Author

Thanks @BillWagner I added a similar note to the Local functions article as well.

@BillWagner

Copy link
Copy Markdown
Member

Hi @FestimReqi This looks good. Once you accept the CLA, I'll get it merged.

@FestimReqi

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@BillWagner BillWagner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This LGTM.

@BillWagner BillWagner merged commit e3ea771 into dotnet:main Jun 16, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C# 8 enhancement: lambda and local function parameters can shadow locals and parameters

2 participants