Skip to content

Add docs on ExtendedLayout#51762

Merged
BillWagner merged 3 commits intodotnet:mainfrom
BillWagner:ExtendedLayoutAttribute
Feb 17, 2026
Merged

Add docs on ExtendedLayout#51762
BillWagner merged 3 commits intodotnet:mainfrom
BillWagner:ExtendedLayoutAttribute

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Feb 17, 2026

Fixes dotnet#51746

Add description of the `ExtendedLayoutAttribute` in the language attributes section.
Copilot AI review requested due to automatic review settings February 17, 2026 19:15
@BillWagner BillWagner requested a review from a team as a code owner February 17, 2026 19:15
@dotnetrepoman dotnetrepoman bot added this to the February 2026 milestone Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation for the ExtendedLayoutAttribute, a new compiler-recognized attribute in .NET 11 that allows developers to specify the ExtendedLayout flag in type metadata. The attribute is applied in source code as an alternative to [StructLayout(LayoutKind.Extended)], which cannot be written directly in C# code.

Changes:

  • Added ExtendedLayoutAttribute section to the general attributes documentation with description and compatibility warnings
  • Added warning in pseudo-attributes documentation about StructLayoutAttribute incompatibility with ExtendedLayout
  • Updated ms.date metadata to reflect the documentation changes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/csharp/language-reference/attributes/general.md Added ExtendedLayout attribute section with API references, description, and IMPORTANT callouts for incompatible attributes (StructLayoutAttribute and InlineArray). Also added the attribute to the table of contents list at the top.
docs/csharp/language-reference/attributes/pseudo-attributes.md Added IMPORTANT callout warning that StructLayoutAttribute cannot be combined with ExtendedLayout, creating cross-reference between the two attribute documentation pages.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillWagner BillWagner enabled auto-merge (squash) February 17, 2026 19:38
@BillWagner BillWagner requested a review from adegeo February 17, 2026 19:39
@BillWagner BillWagner merged commit ba463e1 into dotnet:main Feb 17, 2026
9 checks passed
@BillWagner BillWagner deleted the ExtendedLayoutAttribute branch February 18, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New ExtendedLayoutAttribute recognized by the compiler

2 participants

Comments