Skip to content

Document sizeof behavior for enum types#54567

Merged
BillWagner merged 1 commit into
dotnet:mainfrom
mahdiaghtaee:sizeof-enum-doc-note
Jun 30, 2026
Merged

Document sizeof behavior for enum types#54567
BillWagner merged 1 commit into
dotnet:mainfrom
mahdiaghtaee:sizeof-enum-doc-note

Conversation

@mahdiaghtaee

@mahdiaghtaee mahdiaghtaee commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a short note explaining that sizeof on an enum returns the size of its underlying integral type and that the result is computed at compile time.

Fixes #54499.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/operators/sizeof.md sizeof operator - determine the memory needs for a given type

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

@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 enabled auto-merge (squash) June 30, 2026 19:08
@BillWagner BillWagner merged commit d26cd50 into dotnet:main Jun 30, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sizeof on enum types

2 participants