Skip to content

Add C# 11 errors and warnings for struct initialization and auto default structs #49600

@BillWagner

Description

@BillWagner

Type of issue

Missing information

Description

C# 11 adds the following errors and warnings related to struct declarations with field initializers or constructors:

CS9018, CS9019, CS9020, CS9021, CS9022

Consider these as additions to the constructor declarations article instead.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md

Document Version Independent Id

58a19505-ac46-c5c8-12cc-fe87b6aa18a7

Platform Id

8acee5cb-4bef-a4f2-edd5-e8e236844c4e

Article author

@BillWagner

Metadata

  • ID: bbb051ee-f020-66ba-c601-4a08ad32ef61
  • PlatformId: 8acee5cb-4bef-a4f2-edd5-e8e236844c4e
  • Service: dotnet-csharp
  • Sub-service: errors-warnings

Related Issues


Associated WorkItem - 506001

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-csharp/svcerrors-warnings/subsvcokr-curationOKR: Curate content to remove outdated recommendationsokr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions