Skip to content

Document sizeof behavior for enum types#54567

Open
mahdiaghtaee wants to merge 1 commit into
dotnet:mainfrom
mahdiaghtaee:sizeof-enum-doc-note
Open

Document sizeof behavior for enum types#54567
mahdiaghtaee wants to merge 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
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

1 participant