codemaid
codemaid copied to clipboard
Reorganize Active Document fails on C# records
Environment
- Visual Studio version: 2022 Enterprise 17.6.2
- CodeMaid version: 12.0
- Code language: C#
Description
Nothing happens when "Reorganize Active Document" is executed for record types.
Steps to recreate
- Create a new C# file with the following
record:
public record Foo
{
public string B { get; set; }
public string A { get; set; }
public string C { get; set; }
}
- Execute Reorganize Active Document.
- Note that record is not sorted.
- Change
recordtoclass. - Execute Reorganize Active Document.
- Note that class has been sorted:
public class Foo
{
public string A { get; set; }
public string B { get; set; }
public string C { get; set; }
}
Current behavior
Reorganize Active Document fails when subject is a record.
Expected behavior
Reorganize Active Document should be able to reorganize a record.
Thanks for reporting the issue. CodeMaid has not yet been updated to support record. Related issue #767