Skip to content
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

C#11 "required" keyword is being removed #1062

Open
traseedarkwatch opened this issue Nov 10, 2024 · 1 comment
Open

C#11 "required" keyword is being removed #1062

traseedarkwatch opened this issue Nov 10, 2024 · 1 comment

Comments

@traseedarkwatch
Copy link

Environment

  • Visual Studio version: 2022 Community
  • CodeMaid version: 12.0
  • Code language: C#

Description

The "required" keyword is being removed when code cleanup is done on the file.

Steps to recreate

Sample class. Run CodeMaid on this file.

public abstract Test
{
    public required string Name { get; set; }
}

Current behavior

The "required" keyword is being removed.

Expected behavior

The "required" keyword should remain. It is a valid C#11 keyword and used to enforce the initialization of properties and fields within a class, record, or struct.

@SwissMaWi
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants