Skip to content

Update using-directive.md to reflect unqualified types within namespaces. #47993

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 1 commit into from
Aug 18, 2025

Conversation

AdmiralSnyder
Copy link
Contributor

@AdmiralSnyder AdmiralSnyder commented Aug 18, 2025

using static doesn't require a fully qualified type if it is in the scope of a namespace. see:
https://github.com/dotnet/csharpstandard/blob/standard-v6/standard/namespaces.md#1354-using-static-directives here the grammar is:

using_static_directive
: 'using' 'static' type_name ';'
;

Summary

Describe your changes here.

Fixes #Issue_Number (if available)


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/keywords/using-directive.md The using directive

using static doesn't require a fully qualified type if it is in the scope of a namespace.
see:
https://github.com/dotnet/csharpstandard/blob/standard-v6/standard/namespaces.md#1354-using-static-directives
here the grammar is:
> using_static_directive
>    : 'using' 'static' type_name ';'
>    ;
@AdmiralSnyder AdmiralSnyder requested review from BillWagner and a team as code owners August 18, 2025 12:19
@dotnetrepoman dotnetrepoman bot added this to the August 2025 milestone Aug 18, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc lang-reference/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Aug 18, 2025
Copy link
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 @AdmiralSnyder

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

@BillWagner BillWagner enabled auto-merge (squash) August 18, 2025 13:24
@BillWagner BillWagner merged commit 959e1f5 into dotnet:main Aug 18, 2025
12 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. dotnet-csharp/svc lang-reference/subsvc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants