codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

C#11 "required" keyword is being removed

Open traseedarkwatch opened this issue 1 year ago • 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.

traseedarkwatch avatar Nov 10 '24 01:11 traseedarkwatch

Duplicate of https://github.com/codecadwallader/codemaid/issues/956 https://github.com/codecadwallader/codemaid/issues/956

SwissMaWi avatar Nov 11 '24 15:11 SwissMaWi