codecadwallader/codemaid

C#11 "required" keyword is being removed

Opened this issue · 1 comments

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.